{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "\n",
    "# Dynamic Topic Models Tutorial"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "\n",
    "### What is this tutorial about?\n",
    "This tutorial will exaplin what Dynamic Topic Models are, and how to use them using the LdaSeqModel class of gensim. I will start with some theory and already documented examples, before moving on to an example run of Dynamic Topic Model on a sample dataset. I will also do an comparison between the python code and the already present gensim wrapper, and illustrate how to easily visualise them and do topic coherence with DTM. Any suggestions to improve documentation or code through PRs/Issues is always appreciated!\n",
    "\n",
    "\n",
    "### Why Dynamic Topic Models?\n",
    "Imagine you have a gigantic corpus which spans over a couple of years. You want to find semantically similar documents; one from the very beginning of your time-line, and one in the very end. How would you?\n",
    "This is where Dynamic Topic Models comes in. By having a time-based element to topics, context is preserved while key-words may change.\n",
    "\n",
    "David Blei does a good job explaining the theory behind this in this [Google talk](https://www.youtube.com/watch?v=7BMsuyBPx90). If you prefer to directly read the [paper on DTM by Blei and Lafferty](http://repository.cmu.edu/cgi/viewcontent.cgi?article=2036&context=compsci), that should get you upto speed too.\n",
    "\n",
    "In his talk, Blei gives a very interesting example of the motivation to use DTM. After running DTM on a dataset of the Science Journal from 1880 onwards, he picks up [this](http://science.sciencemag.org/content/os-1/28/326) paper - The Brain of the Orang (1880). It's topics are concentrated on a topic which must be to do with Monkeys, and with Neuroscience or brains. \n",
    "<img src=\"Monkey Brains.png\" width=\"500\">\n",
    "\n",
    "\n",
    "He goes ahead to pick up another paper with likely very less common words, but in the same context - analysing monkey brains. In fact, this one is called - \"[Representation of the visual field on the medial wall of occipital-parietal cortex in the owl monkey](http://allmanlab.caltech.edu/PDFs/AllmanKaas1976.pdf)\". Quite the title, eh? Like mentioned before, you wouldn't imagine too many common words in these two papers, about a 100 years apart.\n",
    "<img src=\"Monkey Brains New.png\" witdth=\"400\">\n",
    "\n",
    "\n",
    "\n",
    "But a Hellinger Distance based Document-Topic distribution gives a very high similarity value! The same topics evolved smoothly over time and the context remains. A document similarity match using other traditional techniques might not work very well on this!\n",
    "Blei defines this technique as - \"Time corrected Document Similarity\".\n",
    "\n",
    "Another obviously useful analysis is to see how words in a topic change over time. The same broad classified topic starts looking more 'mature' as time goes on. This image illustrates an example from the same paper linked to above.\n",
    "\n",
    "<img src=\"Dynamic Topic Model.png\" width=\"800\">\n",
    "\n",
    "#### So, briefly put : \n",
    "\n",
    "Dynamic Topic Models are used to model the evolution of topics in a corpus, over time. The Dynamic Topic Model is part of a class of probabilistic topic models, like the LDA. \n",
    "\n",
    "While most traditional topic mining algorithms do not expect time-tagged data or take into account any prior ordering, Dynamic Topic Models (DTM) leverages the knowledge of different documents belonging to a different time-slice in an attempt to map how the words in a topic change over time.\n",
    "\n",
    "[This](http://rare-technologies.com/understanding-and-coding-dynamic-topic-models/) blog post is also useful in breaking down the ideas and theory behind DTM.\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Motivation to code this!"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "But - why even undertake this, especially when Gensim itself have a wrapper?\n",
    "The main motivation was the lack of documentation in the original code - and the fact that doing an only python version makes it easier to use gensim building blocks. For example, for setting up the Sufficient Statistics to initialize the DTM, you can just pass a pre-trained gensim LDA model!\n",
    "\n",
    "There is some clarity on how they built their code now - Variational Inference using Kalman Filters, as described in section 3 of the paper. The mathematical basis for the code is well described in the appendix of the paper. If the documentation is lacking or not clear, comments via Issues or PRs via the gensim repo would be useful in improving the quality.\n",
    "\n",
    "This project was part of the Google Summer of Code 2016 program: I have been regularly blogging about my progress with implementing this, which you can find [here](http://rare-technologies.com/author/bhargav/)."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Using LdaSeqModel for DTM"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Gensim already has a wrapper for original C++ DTM code, but the `LdaSeqModel` class is an effort to have a pure python implementation of the same.\n",
    "Using it is very similar to using any other gensim topic-modelling algorithm, with all you need to start is an iterable gensim corpus, id2word and a list with the number of documents in each of your time-slices."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "# setting up our imports\n",
    "\n",
    "from gensim.models import ldaseqmodel\n",
    "from gensim.corpora import Dictionary, bleicorpus\n",
    "import numpy\n",
    "from gensim.matutils import hellinger"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We will be loading the corpus and dictionary from disk. Here our corpus in the Blei corpus format, but it can be any iterable corpus.\n",
    "The data set here consists of news reports over 3 months (March, April, May) downloaded from [here](https://github.com/derekgreene/dynamic-nmf/tree/master/data) and cleaned.\n",
    "\n",
    "The files can also be found after processing in the `datasets` folder, but it would be a good exercise to download the files in the link and have a shot at cleaning and processing yourself. :)\n",
    "\n",
    "Note: the dataset is not cleaned and requires pre-processing. This means that some care must be taken to group the relevant docs together (the months are mentioned as per the folder name), after which it needs to be broken into tokens, and stop words must be removed. This is a link to some basic pre-processing for gensim - [link](https://radimrehurek.com/gensim/tut1.html#from-strings-to-vectors).\n",
    "\n",
    "### What is a time-slice?\n",
    "A very important input for DTM to work is the `time_slice` input. It should be a list which contains the number of documents in each time-slice. In our case, the first month had 438 articles, the second 430 and the last month had 456 articles. This means we'd need an input which looks like this: `time_slice = [438, 430, 456]`. \n",
    "Technically, a time-slice can be a month, year, or any way you wish to split up the number of documents in your corpus, time-based.\n",
    "\n",
    "Once you have your corpus, id2word and time_slice ready, we're good to go!"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "# loading our corpus and dictionary\n",
    "try:\n",
    "    dictionary = Dictionary.load('datasets/news_dictionary')\n",
    "except FileNotFoundError as e:\n",
    "    raise ValueError(\"SKIP: Please download the Corpus/news_dictionary dataset.\")\n",
    "corpus = bleicorpus.BleiCorpus('datasets/news_corpus')\n",
    "# it's very important that your corpus is saved in order of your time-slices!\n",
    "\n",
    "time_slice = [438, 430, 456]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "For DTM to work it first needs the Sufficient Statistics from a trained LDA model on the _*same*_ dataset. \n",
    "By default LdaSeqModel trains it's own model and passes those values on, but can also accept a pre-trained gensim LDA model, or a numpy matrix which contains the Suff Stats.\n",
    "\n",
    "We will be training our model in default mode, so gensim LDA will be first trained on the dataset.\n",
    "\n",
    "NOTE: You have to set logging as true to see your progress!"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false,
    "scrolled": true
   },
   "outputs": [],
   "source": [
    "ldaseq = ldaseqmodel.LdaSeqModel(corpus=corpus, id2word=dictionary, time_slice=time_slice, num_topics=5)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Now that our model is trained, let's see what our results look like.\n",
    "\n",
    "### Results\n",
    "Much like LDA, the points of interest would be in what the topics are and how the documents are made up of these topics.\n",
    "In DTM we have the added interest of seeing how these topics evolve over time.\n",
    "\n",
    "Let's go through some of the functions to print Topics and analyse documents.\n",
    "\n",
    "### Printing Topics\n",
    "\n",
    "To print all topics from a particular time-period, simply use `print_topics`. \n",
    "The input parameter to `print_topics` is a time-slice option. By passing `0` we are seeing the topics in the 1st time-slice. \n",
    "\n",
    "The result would be a list of lists, where each individual list contains a tuple of the most probable words in the topic. i.e `(word, word_probability)`"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[[('last', 0.0030000000000000001),\n",
       "  ('market', 0.0030000000000000001),\n",
       "  ('year', 0.0030000000000000001),\n",
       "  ('firm', 0.0030000000000000001),\n",
       "  ('use', 0.0030000000000000001),\n",
       "  ('net', 0.002),\n",
       "  ('company', 0.002),\n",
       "  ('information', 0.002),\n",
       "  ('growth', 0.002),\n",
       "  ('bank', 0.002),\n",
       "  ('oil', 0.002),\n",
       "  ('firms', 0.002),\n",
       "  ('economic', 0.002),\n",
       "  ('search', 0.002),\n",
       "  ('much', 0.002),\n",
       "  ('sales', 0.002),\n",
       "  ('economy', 0.002),\n",
       "  ('prices', 0.002),\n",
       "  ('government', 0.002),\n",
       "  ('european', 0.002)],\n",
       " [('music', 0.0060000000000000001),\n",
       "  ('best', 0.0040000000000000001),\n",
       "  ('show', 0.0040000000000000001),\n",
       "  ('last', 0.0040000000000000001),\n",
       "  ('uk', 0.0040000000000000001),\n",
       "  ('number', 0.0030000000000000001),\n",
       "  ('top', 0.0030000000000000001),\n",
       "  ('first', 0.0030000000000000001),\n",
       "  ('tv', 0.0030000000000000001),\n",
       "  ('band', 0.0030000000000000001),\n",
       "  ('bbc', 0.0030000000000000001),\n",
       "  ('like', 0.002),\n",
       "  ('album', 0.002),\n",
       "  ('song', 0.002),\n",
       "  ('british', 0.002),\n",
       "  ('three', 0.002),\n",
       "  ('make', 0.002),\n",
       "  ('police', 0.002),\n",
       "  ('singer', 0.002),\n",
       "  ('year', 0.002)],\n",
       " [('club', 0.0050000000000000001),\n",
       "  ('game', 0.0040000000000000001),\n",
       "  ('chelsea', 0.0040000000000000001),\n",
       "  ('united', 0.0040000000000000001),\n",
       "  ('players', 0.0040000000000000001),\n",
       "  ('league', 0.0040000000000000001),\n",
       "  ('last', 0.0030000000000000001),\n",
       "  ('cup', 0.0030000000000000001),\n",
       "  ('arsenal', 0.0030000000000000001),\n",
       "  ('think', 0.0030000000000000001),\n",
       "  ('first', 0.0030000000000000001),\n",
       "  ('football', 0.0030000000000000001),\n",
       "  ('play', 0.0030000000000000001),\n",
       "  ('manchester', 0.0030000000000000001),\n",
       "  ('win', 0.0030000000000000001),\n",
       "  ('time', 0.0030000000000000001),\n",
       "  ('manager', 0.0030000000000000001),\n",
       "  ('good', 0.0030000000000000001),\n",
       "  ('like', 0.0030000000000000001),\n",
       "  ('liverpool', 0.0030000000000000001)],\n",
       " [('film', 0.0080000000000000002),\n",
       "  ('best', 0.0070000000000000001),\n",
       "  ('mobile', 0.0060000000000000001),\n",
       "  ('games', 0.0040000000000000001),\n",
       "  ('million', 0.0040000000000000001),\n",
       "  ('phone', 0.0040000000000000001),\n",
       "  ('broadband', 0.0030000000000000001),\n",
       "  ('uk', 0.0030000000000000001),\n",
       "  ('technology', 0.0030000000000000001),\n",
       "  ('director', 0.0030000000000000001),\n",
       "  ('video', 0.0030000000000000001),\n",
       "  ('phones', 0.0030000000000000001),\n",
       "  ('first', 0.0030000000000000001),\n",
       "  ('last', 0.0030000000000000001),\n",
       "  ('game', 0.002),\n",
       "  ('number', 0.002),\n",
       "  ('according', 0.002),\n",
       "  ('films', 0.002),\n",
       "  ('award', 0.002),\n",
       "  ('actor', 0.002)],\n",
       " [('government', 0.0060000000000000001),\n",
       "  ('blair', 0.0050000000000000001),\n",
       "  ('labour', 0.0050000000000000001),\n",
       "  ('minister', 0.0040000000000000001),\n",
       "  ('prime', 0.0030000000000000001),\n",
       "  ('public', 0.0030000000000000001),\n",
       "  ('party', 0.0030000000000000001),\n",
       "  ('election', 0.0030000000000000001),\n",
       "  ('says', 0.0030000000000000001),\n",
       "  ('home', 0.0030000000000000001),\n",
       "  ('security', 0.0030000000000000001),\n",
       "  ('make', 0.0030000000000000001),\n",
       "  ('say', 0.0030000000000000001),\n",
       "  ('brown', 0.0030000000000000001),\n",
       "  ('bbc', 0.0030000000000000001),\n",
       "  ('howard', 0.0030000000000000001),\n",
       "  ('lord', 0.0030000000000000001),\n",
       "  ('plans', 0.002),\n",
       "  ('tory', 0.002),\n",
       "  ('secretary', 0.002)]]"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ldaseq.print_topics(time=0)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We can see 5 different fairly well defined topics:\n",
    "1. Economy\n",
    "2. Entertainment\n",
    "3. Football\n",
    "4. Technology and Entertainment\n",
    "5. Government"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Looking for Topic Evolution\n",
    "\n",
    "To fix a topic and see it evolve, use `print_topic_times`.\n",
    "The input parameter is the `topic_id`\n",
    "In this case, we are looking at the evolution of the technology topic."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "If you look at the lower frequencies; the word \"may\" is creeping itself into prominence. This makes sense, as the 3rd time-slice are news reports about the economy in the month of may. This isn't present at all in the first time-slice because it's still March!\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[[('last', 0.0030000000000000001),\n",
       "  ('market', 0.0030000000000000001),\n",
       "  ('year', 0.0030000000000000001),\n",
       "  ('firm', 0.0030000000000000001),\n",
       "  ('use', 0.0030000000000000001),\n",
       "  ('net', 0.002),\n",
       "  ('company', 0.002),\n",
       "  ('information', 0.002),\n",
       "  ('growth', 0.002),\n",
       "  ('bank', 0.002),\n",
       "  ('oil', 0.002),\n",
       "  ('firms', 0.002),\n",
       "  ('economic', 0.002),\n",
       "  ('search', 0.002),\n",
       "  ('much', 0.002),\n",
       "  ('sales', 0.002),\n",
       "  ('economy', 0.002),\n",
       "  ('prices', 0.002),\n",
       "  ('government', 0.002),\n",
       "  ('european', 0.002)],\n",
       " [('market', 0.0030000000000000001),\n",
       "  ('last', 0.0030000000000000001),\n",
       "  ('year', 0.0030000000000000001),\n",
       "  ('firm', 0.0030000000000000001),\n",
       "  ('use', 0.0030000000000000001),\n",
       "  ('company', 0.002),\n",
       "  ('growth', 0.002),\n",
       "  ('net', 0.002),\n",
       "  ('information', 0.002),\n",
       "  ('economic', 0.002),\n",
       "  ('firms', 0.002),\n",
       "  ('bank', 0.002),\n",
       "  ('oil', 0.002),\n",
       "  ('search', 0.002),\n",
       "  ('much', 0.002),\n",
       "  ('sales', 0.002),\n",
       "  ('economy', 0.002),\n",
       "  ('prices', 0.002),\n",
       "  ('european', 0.002),\n",
       "  ('may', 0.002)],\n",
       " [('market', 0.0030000000000000001),\n",
       "  ('last', 0.0030000000000000001),\n",
       "  ('year', 0.0030000000000000001),\n",
       "  ('firm', 0.0030000000000000001),\n",
       "  ('use', 0.0030000000000000001),\n",
       "  ('information', 0.0030000000000000001),\n",
       "  ('net', 0.0030000000000000001),\n",
       "  ('company', 0.002),\n",
       "  ('growth', 0.002),\n",
       "  ('firms', 0.002),\n",
       "  ('search', 0.002),\n",
       "  ('economic', 0.002),\n",
       "  ('much', 0.002),\n",
       "  ('oil', 0.002),\n",
       "  ('bank', 0.002),\n",
       "  ('economy', 0.002),\n",
       "  ('sales', 0.002),\n",
       "  ('may', 0.002),\n",
       "  ('european', 0.002),\n",
       "  ('however,', 0.002)]]"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ldaseq.print_topic_times(topic=0) # evolution of 1st topic"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Document - Topic Proportions\n",
    "the function `doc_topics` checks the topic proportions on documents already trained on. It accepts the document number in the corpus as an input.\n",
    "\n",
    "Let's pick up document number 558 arbitrarily and have a look."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "['set', 'time,\"', 'chairman', 'decision', 'news', 'director', 'former', 'vowed', '\"it', 'results', 'club', 'third', 'home', 'paul', 'saturday.', 'south', 'conference', 'leading', '\"some', 'survival', 'needed', 'coach', \"don't\", 'every', 'trouble', 'desperate', 'eight', 'first', 'win', 'going', 'park', 'near', 'chance', 'manager', 'league', 'milan', 'games', 'go', 'game', 'foot', 'say', 'upset', \"i'm\", 'poor', 'season.', 'executive', 'road', '24', 'debut', 'portsmouth.', 'give', 'claiming', 'steve', 'break', 'rivals', 'boss', 'kevin', 'premiership', 'little', 'left', 'table.', 'life', 'join', 'years.', 'bring', 'season,', 'director.', 'became', 'st', 'according', 'official', 'hope', 'shocked', 'though', 'phone', 'charge', '14', 'website.', 'time,', 'claimed', 'kept', 'bond', 'appointment', 'unveil', 'november', 'picked', 'confirmed,', 'believed', 'deep', 'position', 'surprised', 'negotiations', 'talks', 'gmt', 'middlesbrough', 'replaced', 'appear', 'football,', '\"i\\'m', 'charge.', 'saints', 'southampton', 'sturrock', 'wednesday.', 'harry', 'poised', 'ninth', 'quit', 'relieved', 'chance.\"', 'decision.\"', 'hero', 'redknapp,', 'redknapp', \"saints'\", 'first-team', \"wouldn't\", \"mary's.\", 'portsmouth', \"redknapp's\", 'pompey', 'academy', \"harry's\", 'cult', 'rupert', 'time\".', 'coast', '57,', 'succeed', 'duties', \"'i\", 'bitter,', \"mandaric's\", \"portsmouth's\", 'wigley,', 'wigley', \"southampton',\", '1500', 'mandaric', \"'absolutely\", 'lowe', '\"disappointed\"', 'velimir', 'not\\',\"', 'disgusted', 'disappointed,', 'mandaric,', 'fratton', 'replaces', 'masterminding', 'angry,', 'vowed:', 'informed.\"', 'zajec']\n"
     ]
    }
   ],
   "source": [
    "# to check Document - Topic proportions, use `doc-topics`\n",
    "words = [dictionary[word_id] for word_id, count in corpus[558]]\n",
    "print (words)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "It's pretty clear that it's a news article about football. What topics will it likely be comprised of?"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[  5.46298825e-05   5.46298825e-05   9.32273855e-01   6.75622555e-02\n",
      "   5.46298825e-05]\n"
     ]
    }
   ],
   "source": [
    "doc = ldaseq.doc_topics(558) # check the 558th document in the corpuses topic distribution\n",
    "print (doc)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Let's look at our topics as desribed by us, again:\n",
    "\n",
    "1. Economy\n",
    "2. Entertainment\n",
    "3. Football\n",
    "4. Technology and Entertainment\n",
    "5. Government\n",
    "\n",
    "Our topic distribution for the above document is largely in topics 3 and 4. Considering it is a document about a news article on a football match, the distribution makes perfect sense!"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "If we wish to analyse a document not in our training set, we can use simply pass the doc to the model similar to the `__getitem__` funciton for `LdaModel`.\n",
    "\n",
    "Let's let our document be a hypothetical news article about the effects of Ryan Giggs buying mobiles affecting the British economy."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[ 0.40632917  0.00110497  0.3465658   0.24489509  0.00110497]\n"
     ]
    }
   ],
   "source": [
    "doc_football_1 = ['economy', 'bank', 'mobile', 'phone', 'markets', 'buy', 'football', 'united', 'giggs']\n",
    "doc_football_1 = dictionary.doc2bow(doc_football_1)\n",
    "doc_football_1 = ldaseq[doc_football_1]\n",
    "print (doc_football_1)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Pretty neat! Topic 1 is about the Economy, and this document also has traces of football and technology, so topics 1, 3, and 4 got correctly activated."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Distances between documents\n",
    "\n",
    "One of the more handy uses of DTMs topic modelling is that we can compare documents across different time-frames and see how similar they are topic-wise. When words may not necessarily overlap over these time-periods, this is very useful.\n",
    "\n",
    "The current dataset doesn't provide us the diversity for this to be an effective example; but we will nevertheless illustrate how to do the same.\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "doc_football_2 = ['arsenal', 'fourth', 'wenger', 'oil', 'middle', 'east', 'sanction', 'fluctuation']\n",
    "doc_football_2 = dictionary.doc2bow(doc_football_2)\n",
    "doc_football_2 = ldaseq[doc_football_2]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.35085394585966118"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "hellinger(doc_football_1, doc_football_2)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The topic distributions are quite related - matches well in football and economy."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Now let's try with documents that shouldn't be similar."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.95132142484351623"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "doc_governemt_1 = ['tony', 'government', 'house', 'party', 'vote', 'european', 'official', 'house']\n",
    "doc_governemt_1 = dictionary.doc2bow(doc_governemt_1)\n",
    "doc_governemt_1 = ldaseq[doc_governemt_1]\n",
    "\n",
    "hellinger(doc_football_1, doc_governemt_1)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "As expected, the value is very high, meaning the topic distributions are far apart.\n",
    "\n",
    "For more information on how to use the gensim distance metrics, check out [this notebook](distance_metrics.ipynb)."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Performance\n",
    "\n",
    "The code currently runs between 5 to 7 times slower than the original C++ DTM code. The bottleneck is in the scipy `optimize.fmin_cg` method for updating obs. Speeding this up would fix things up!\n",
    "\n",
    "Since it uses iterable gensim corpuses, the memory stamp is also cleaner. \n",
    "\n",
    "TODO: check memory, check BLAS, see how performance can be improved memory and speed wise. "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The advantages of the python port are that unlike the C++ code we needn't treat it like a black-box; PRs to help make the code better are welcomed, as well as help to make the documentation clearer and improve performance. It is also in pure python and doesn't need any dependancy outside of what gensim already needs. The added functionality of being able to analyse new documents is also a plus!\n",
    "\n",
    "## Choosing your best Dynamic Topic Model.\n",
    "\n",
    "Like we've been going on and on before, the advantage in having a python port is the transparency with which you can train your DTM.\n",
    "We'll go over two key ideas: changing variance, and changing suff stats.\n",
    "\n",
    "\n",
    "### Chain Variance\n",
    "One of the key aspects of topic evolution is how fast/slow these topics evolve. And this is where the factor of `variance` comes in.\n",
    "By setting the `chain_variance` input to the DTM model higher, we can tweak our topic evolution.\n",
    "The default value is 0.005. (this is the value suggested by Blei in his tech talk and is the default value in the C++ code)\n",
    "\n",
    "Let us see a small example illustrating the same.\n",
    "Let's first see the evolution of values for the first time-slice."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[[('music', 0.0060000000000000001),\n",
       "  ('best', 0.0040000000000000001),\n",
       "  ('show', 0.0040000000000000001),\n",
       "  ('last', 0.0040000000000000001),\n",
       "  ('uk', 0.0040000000000000001),\n",
       "  ('number', 0.0030000000000000001),\n",
       "  ('top', 0.0030000000000000001),\n",
       "  ('first', 0.0030000000000000001),\n",
       "  ('tv', 0.0030000000000000001),\n",
       "  ('band', 0.0030000000000000001),\n",
       "  ('bbc', 0.0030000000000000001),\n",
       "  ('like', 0.002),\n",
       "  ('album', 0.002),\n",
       "  ('song', 0.002),\n",
       "  ('british', 0.002),\n",
       "  ('three', 0.002),\n",
       "  ('make', 0.002),\n",
       "  ('police', 0.002),\n",
       "  ('singer', 0.002),\n",
       "  ('year', 0.002)],\n",
       " [('music', 0.0060000000000000001),\n",
       "  ('best', 0.0040000000000000001),\n",
       "  ('show', 0.0040000000000000001),\n",
       "  ('number', 0.0040000000000000001),\n",
       "  ('last', 0.0040000000000000001),\n",
       "  ('uk', 0.0040000000000000001),\n",
       "  ('top', 0.0030000000000000001),\n",
       "  ('first', 0.0030000000000000001),\n",
       "  ('tv', 0.0030000000000000001),\n",
       "  ('band', 0.0030000000000000001),\n",
       "  ('bbc', 0.0030000000000000001),\n",
       "  ('album', 0.002),\n",
       "  ('like', 0.002),\n",
       "  ('song', 0.002),\n",
       "  ('british', 0.002),\n",
       "  ('three', 0.002),\n",
       "  ('make', 0.002),\n",
       "  ('singer', 0.002),\n",
       "  ('police', 0.002),\n",
       "  ('year', 0.002)],\n",
       " [('music', 0.0060000000000000001),\n",
       "  ('best', 0.0040000000000000001),\n",
       "  ('show', 0.0040000000000000001),\n",
       "  ('number', 0.0040000000000000001),\n",
       "  ('last', 0.0040000000000000001),\n",
       "  ('uk', 0.0040000000000000001),\n",
       "  ('tv', 0.0030000000000000001),\n",
       "  ('top', 0.0030000000000000001),\n",
       "  ('band', 0.0030000000000000001),\n",
       "  ('first', 0.0030000000000000001),\n",
       "  ('bbc', 0.0030000000000000001),\n",
       "  ('song', 0.0030000000000000001),\n",
       "  ('album', 0.002),\n",
       "  ('like', 0.002),\n",
       "  ('british', 0.002),\n",
       "  ('three', 0.002),\n",
       "  ('make', 0.002),\n",
       "  ('singer', 0.002),\n",
       "  ('record', 0.002),\n",
       "  ('rock', 0.002)]]"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ldaseq.print_topic_times(1)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Now let us do the same, but after increasing the `chain_variance` value."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/Users/bhargavvader/Open_Source/gensim/gensim/models/ldaseqmodel.py:217: RuntimeWarning: divide by zero encountered in double_scalars\n",
      "  convergence = numpy.fabs((bound - old_bound) / old_bound)\n"
     ]
    }
   ],
   "source": [
    "ldaseq_chain = ldaseqmodel.LdaSeqModel(corpus=corpus, id2word=dictionary, time_slice=time_slice, num_topics=5, chain_variance=0.05)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "It's noticable that the values are moving more freely after increasing the chain_variance. Film went from highest probability to 5th to 8th!"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[[('film', 0.012),\n",
       "  ('last', 0.0040000000000000001),\n",
       "  ('number', 0.0040000000000000001),\n",
       "  ('top', 0.0030000000000000001),\n",
       "  ('yukos', 0.0030000000000000001),\n",
       "  ('uk', 0.0030000000000000001),\n",
       "  ('court', 0.0030000000000000001),\n",
       "  ('first', 0.002),\n",
       "  ('russian', 0.002),\n",
       "  ('box', 0.002),\n",
       "  ('company', 0.002),\n",
       "  ('deal', 0.002),\n",
       "  ('sale', 0.002),\n",
       "  ('three', 0.002),\n",
       "  ('sales', 0.002),\n",
       "  ('sold', 0.002),\n",
       "  ('oil', 0.002),\n",
       "  ('group', 0.002),\n",
       "  ('director', 0.002),\n",
       "  ('firm', 0.002)],\n",
       " [('number', 0.0050000000000000001),\n",
       "  ('last', 0.0040000000000000001),\n",
       "  ('uk', 0.0040000000000000001),\n",
       "  ('top', 0.0040000000000000001),\n",
       "  ('film', 0.0030000000000000001),\n",
       "  ('first', 0.0030000000000000001),\n",
       "  ('chart', 0.0030000000000000001),\n",
       "  ('sales', 0.002),\n",
       "  ('yukos', 0.002),\n",
       "  ('group', 0.002),\n",
       "  ('company', 0.002),\n",
       "  ('sold', 0.002),\n",
       "  ('court', 0.002),\n",
       "  ('russian', 0.002),\n",
       "  ('record', 0.002),\n",
       "  ('three', 0.002),\n",
       "  ('sale', 0.002),\n",
       "  ('music', 0.002),\n",
       "  ('released', 0.002),\n",
       "  ('year', 0.002)],\n",
       " [('number', 0.0050000000000000001),\n",
       "  ('uk', 0.0040000000000000001),\n",
       "  ('last', 0.0040000000000000001),\n",
       "  ('top', 0.0040000000000000001),\n",
       "  ('chart', 0.0030000000000000001),\n",
       "  ('show', 0.0030000000000000001),\n",
       "  ('group', 0.0030000000000000001),\n",
       "  ('film', 0.002),\n",
       "  ('three', 0.002),\n",
       "  ('first', 0.002),\n",
       "  ('music', 0.002),\n",
       "  ('record', 0.002),\n",
       "  ('band', 0.002),\n",
       "  ('sales', 0.002),\n",
       "  ('company', 0.002),\n",
       "  ('bid', 0.002),\n",
       "  ('sold', 0.002),\n",
       "  ('deutsche', 0.002),\n",
       "  ('year', 0.002),\n",
       "  ('including', 0.002)]]"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ldaseq_chain.print_topic_times(2)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### LDA Model and DTM\n",
    "\n",
    "For the first slice of DTM to get setup, we need to provide it sufficient stats from an LDA model. As discussed before, this is done by fitting gensim LDA on the dataset first. \n",
    "\n",
    "We also, however, have the option of passing our own model or suff stats values. Our final DTM results are heavily influenced by what we pass over here. We already know what a \"Good\" or \"Bad\" LDA model is (if not, read about it [here](http://nbviewer.jupyter.org/github/dsquareindia/gensim/blob/280375fe14adea67ce6384ba7eabf362b05e6029/docs/notebooks/topic_coherence_tutorial.ipynb)). \n",
    "\n",
    "It's quite obvious, then, that by passing a \"bad\" LDA model we will get not so satisfactory results; and by passing a better fitted or better trained LDA we will get better results. The same logic goes if we wish to directly pass the `suff_stats` numpy matrix."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Visualising Dynamic Topic Models.\n",
    "\n",
    "Let us use pyLDAvis to visualise both the DTM wrapper and DTM python port.\n",
    "With the new `DTMvis` methods it is now very straightforward to visualise DTM for a particular time-slice."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "from gensim.models.wrappers.dtmmodel import DtmModel\n",
    "from gensim.corpora import Dictionary, bleicorpus\n",
    "import pyLDAvis\n",
    "\n",
    "# dtm_path = \"/Users/bhargavvader/Downloads/dtm_release/dtm/main\"\n",
    "# dtm_model = DtmModel(dtm_path, corpus, time_slice, num_topics=5, id2word=dictionary, initialize_lda=True)\n",
    "# dtm_model.save('dtm_news')\n",
    "\n",
    "# if we've saved before simply load the model\n",
    "dtm_model = DtmModel.load('dtm_news')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "If you take some time to look at the topics, you will notice large semantic similarities with the wrapper and the python DTM. \n",
    "Functionally, the python DTM replicates the wrapper quite well."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<link rel=\"stylesheet\" type=\"text/css\" href=\"https://cdn.rawgit.com/bmabey/pyLDAvis/files/ldavis.v1.0.0.css\">\n",
       "\n",
       "\n",
       "<div id=\"ldavis_el289547981492804887376815\"></div>\n",
       "<script type=\"text/javascript\">\n",
       "\n",
       "var ldavis_el289547981492804887376815_data = {\"mdsDat\": {\"y\": [-0.003322298793485215, 0.10377535722853247, 0.08845453176862277, -0.18388845904500414, -0.005019131158665953], \"Freq\": [39.869700776266534, 19.84790751627094, 18.728889407430646, 15.010575160600398, 6.542927139431483], \"topics\": [1, 2, 3, 4, 5], \"cluster\": [1, 1, 1, 1, 1], \"x\": [-0.026064649996766245, -0.07671645977259904, -0.05882960032687375, -0.07765206997068846, 0.23926278006692747]}, \"lambda.step\": 0.01, \"topic.order\": [1, 3, 5, 2, 4], \"plot.opts\": {\"xlab\": \"PC1\", \"ylab\": \"PC2\"}, \"token.table\": {\"Freq\": [0.32710307160227253, 0.6635519452503242, 0.9120598847202313, 0.11150849305905233, 0.3902797257066832, 0.07805594514133664, 0.41258142431849365, 0.990076897020546, 0.9798879824319267, 0.371145434985542, 0.1192967469596385, 0.503697376051807, 0.9880896127480736, 0.9632963915831404, 0.0356776441327089, 0.958930472531671, 0.9645791147107622, 0.21472350847803026, 0.12883410508681817, 0.22085846586311683, 0.4294470169560605, 0.09935580271392988, 0.8942022244253689, 0.995071834861585, 0.058714328126737894, 0.9394292500278063, 0.9769612563593266, 0.9507502535938638, 0.023939246153537642, 0.9735293435771973, 0.9922610863484485, 0.9761996198037097, 0.9748057547797122, 0.9902548959800453, 0.13105854625168173, 0.8518805506359312, 0.018332580889332057, 0.9716267871345992, 0.966300620171133, 0.9749415938729286, 0.36192082868540626, 0.17191239362556798, 0.26239260079691956, 0.11762426932275703, 0.08746420026563985, 0.06602698666070254, 0.09797552859330055, 0.8306620902475482, 0.006389708386519602, 0.13237309913226408, 0.14255564521936132, 0.040730184348388945, 0.6924131339226122, 0.993977791367316, 0.960807682418406, 0.9709855616268713, 0.9457439832580523, 0.05244505363400223, 0.9265292808673727, 0.01748168454466741, 0.14908031641949507, 0.8402708743644268, 0.4845315211396737, 0.4792648741707642, 0.03159988181345698, 0.9932718275536769, 0.8789170356372482, 0.07191139382486576, 0.04794092921657718, 0.9808483287810853, 0.9844068282662627, 0.1812326078924172, 0.1335398163417811, 0.6772376400190327, 0.9665341082243053, 0.9908596951702104, 0.9929669306963993, 0.07979820297093371, 0.9043796336705819, 0.9919217081836528, 0.9577444276676467, 0.992416724378866, 0.5298886185732357, 0.10367386015563305, 0.02879829448767585, 0.04031761228274619, 0.305261921569364, 0.983766896103358, 0.010141926763952144, 0.9778940707251264, 0.9752011761263005, 0.9827297336259622, 0.9756639793228642, 0.40484369961027084, 0.039178422542929435, 0.039178422542929435, 0.4962600188771062, 0.30421496167056306, 0.09475547986460162, 0.2992278311513735, 0.29424070063218394, 0.022756761295366905, 0.9633695615038655, 0.9760798791367571, 0.9855197482031478, 0.022796755449750815, 0.9726615658560348, 0.9222841691322345, 0.2863769547582958, 0.704927888635805, 0.9949309922576469, 0.9561779878533975, 0.21458945573823185, 0.7843614589052612, 0.9866329718030932, 0.9715198708711824, 0.1700722100476659, 0.08777920518589208, 0.515702830467116, 0.1700722100476659, 0.05486200324118255, 0.9532516812219388, 0.24952183538264447, 0.4812206825236715, 0.1960528706577921, 0.06683620590606548, 0.9646191025659542, 0.959579706087098, 0.03234538335125049, 0.9523112711606707, 0.9921476674844572, 0.9911365352090125, 0.9916548796044704, 0.9967370237629491, 0.8869660736179107, 0.10333585323703813, 0.5538261113534602, 0.14929225610397623, 0.019263516916642093, 0.08186994689572889, 0.19745104839558145, 0.9711580989987282, 0.13767623285800995, 0.13767623285800995, 0.06883811642900498, 0.6539621060755473, 0.41992627796141135, 0.1857366229444704, 0.0726795481087058, 0.3230202138164703, 0.6812906114709522, 0.10969933574532281, 0.09815203724581514, 0.028868246248769158, 0.08083108949655364, 0.9800104480614773, 0.983210981746962, 0.978492448619959, 0.9689764710445061, 0.9162789163167524, 0.07779726647972426, 0.9683642983891394, 0.020665897393980903, 0.9772017196296683, 0.10069379411359136, 0.8936574227581233, 0.468481505023277, 0.05621778060279324, 0.10306593110512094, 0.36541557391815604, 0.29453623553639097, 0.044180435330458644, 0.009817874517879698, 0.422168604268827, 0.2307200511701729, 0.30846876363121184, 0.4750418959920662, 0.21592813454184828, 0.28309813305379933, 0.2791933312185745, 0.3026221422299234, 0.10152484771584527, 0.03319081559941096, 0.9888278357881229, 0.8801415211523678, 0.016451243386025566, 0.08225621693012783, 0.016451243386025566, 0.18040792280679818, 0.2906572089665082, 0.2154872411303423, 0.31571386491189685, 0.08083826230554617, 0.8892208853610079, 0.023836190534746924, 0.7525425868827244, 0.17706884397240572, 0.04426721099310143, 0.9870269641237108, 0.9492432019007833, 0.043354417696300884, 0.9212813760463938, 0.03251581327222566, 0.39667838548469553, 0.3815668279424214, 0.09822512402478174, 0.12089246033819293, 0.35777531588779776, 0.4783300418934687, 0.12444358813488618, 0.038888621292151926, 0.980803524039024, 0.12031771577515028, 0.6531533142079587, 0.17761186614426946, 0.05156473533220727, 0.8073770752636602, 0.18997107653262593, 0.2712493885866844, 0.1356246942933422, 0.27714611442552534, 0.09434761342145544, 0.22407558187595666, 0.9957269085016803, 0.09234157256592578, 0.8926352014706158, 0.9717825534192482, 0.024294563835481207, 0.4520939704134298, 0.1069469607429619, 0.03888980390653159, 0.36945313711205013, 0.029167352929898697, 0.9951885046714672, 0.4187092466111697, 0.3279889098454163, 0.10118806793103269, 0.15003748003566916, 0.8579896038889625, 0.0389995274494983, 0.10139877136869557, 0.19702902221322743, 0.1860829654236037, 0.6129791802189298, 0.9720154843828561, 0.9734527859578052, 0.9812092366915398, 0.27360903758880956, 0.04828394780978992, 0.5472180751776191, 0.1287571941594398, 0.9855897250004467, 0.016832975677134064, 0.9145916784576176, 0.06733190270853626, 0.9799107538303949, 0.1295913745885386, 0.8293847973666469, 0.9472349810389931, 0.04241350661368626, 0.949336574710418, 0.9582299583172068, 0.07461992430506567, 0.12436654050844279, 0.7710725511523452, 0.9880775521895563, 0.009880775521895563, 0.36412916485638813, 0.24446230316649534, 0.2598480425266244, 0.05128579786709692, 0.08034774999178518, 0.033348727794376844, 0.013339491117750736, 0.9471038693603023, 0.9545228466470003, 0.93476117844606, 0.9246117778479671, 0.9584105418035126, 0.9437416137661787, 0.994729356948172, 0.056771359503879175, 0.13787330165227799, 0.8029092272691483, 0.9704843659917785, 0.9904594447743048, 0.27070054403506383, 0.2945858861558048, 0.17250524864979558, 0.2627387633281502, 0.9925237520300463, 0.09003870946386222, 0.06752903209789667, 0.8403612883293807, 0.9846535998219019, 0.9811703084524321, 0.9695178485928254, 0.4066767848232652, 0.1692381651127874, 0.13134902366962603, 0.2778537039165166, 0.015155656577264542, 0.9735685626255675, 0.0399529291102329, 0.8390115113148909, 0.04661175062860505, 0.07324703670209365, 0.9718340530856515, 0.02295670991540909, 0.926186436495182, 0.07386762990452371, 0.9375923869363928, 0.5625759807995583, 0.1434757534925048, 0.12082168715158298, 0.0830649099167133, 0.09061626536368723, 0.9561613051473998, 0.27258888161610945, 0.051110415303020525, 0.051110415303020525, 0.6303617887372531, 0.9152882002645468, 0.06423075089575767, 0.9860491746602222, 0.9712243354046589, 0.4424743783557402, 0.3422915002374594, 0.2128886160013467, 0.9846725270680498, 0.009701207163232018, 0.05965647572762815, 0.8829158407688966, 0.04772518058210252, 0.9938490614422062, 0.9843834102488981, 0.9881433769815935, 0.9896295547177213, 0.39513806403113805, 0.04473261102239299, 0.1863858792599708, 0.3727717585199416, 0.5538599581853365, 0.20870085380896736, 0.08026955915729514, 0.15652564035672553, 0.0948636532700182, 0.8853940971868365, 0.9929741548960713, 0.9742736667606179, 0.04345128046097877, 0.05793504061463837, 0.8979931295268947, 0.12189814751887958, 0.03750712231350141, 0.8345334714754064, 0.9769590835841582, 0.9891923627167527, 0.6002857833487573, 0.18838755966796103, 0.14049241737949636, 0.057474170746157606, 0.012772037943590579, 0.9735017767404783, 0.9651002378955951, 0.3116257867874562, 0.05445887536091468, 0.4780279059458066, 0.1543001468559249, 0.9713094732267193, 0.021538262507160986, 0.050255945850042304, 0.9261452878079225, 0.9730008857336885, 0.2163471011584501, 0.7692341374522671, 0.9157779922761361, 0.05592537357411518, 0.02796268678705759, 0.989032362784417, 0.9639616436135766, 0.16657108112872915, 0.825283992865067, 0.9879424867168145, 0.8635993342431674, 0.04227409328463057, 0.05435240565166787, 0.04227409328463057, 0.11214267984581378, 0.6308025741327025, 0.25699364131332325, 0.03204562827014988, 0.8438682111139469, 0.02136375218009992, 0.09613688481044964, 0.07639982750675739, 0.8949694079363009, 0.032742783217181735, 0.02685683641192089, 0.9578938320251783, 0.9840529586635508, 0.023608509316885413, 0.967948881992302, 0.9904032589270126, 0.9916530208212017, 0.9540953032337063, 0.047510153628209026, 0.9502030725641805, 0.9722408664481994, 0.9836737033703093, 0.9111231184495426, 0.6592616084193402, 0.01443638558582497, 0.13473959880103303, 0.06736979940051652, 0.1251153417438164, 0.9796573459939708, 0.9900201800199186, 0.21153698197272944, 0.5374182785253127, 0.13149596176683181, 0.12006153030884643, 0.37869809918920216, 0.1476280725652822, 0.4685586650985044, 0.9761169449519059, 0.8517390077703636, 0.03226284120342286, 0.11614622833232231, 0.14355998994658098, 0.026917498114983937, 0.07177999497329049, 0.7626624465912115, 0.910396688676854, 0.0601205360446979, 0.025765944019156245, 0.9889072829548203, 0.04807566116335924, 0.9454880028793984, 0.6853241032823525, 0.3141068806710782, 0.5639468576956327, 0.1231151590743987, 0.05957185116503163, 0.23431594791579108, 0.019857283721677207, 0.03985581330596618, 0.9565395193431883, 0.9708033150586707, 0.9886174499146632, 0.1031021894885204, 0.032558586154269605, 0.8628025330881445, 0.9573351055923849, 0.3795042306871314, 0.6110661341572454, 0.5941200618470956, 0.15152055268583647, 0.19139438234000397, 0.06778551041208473, 0.21440126105984855, 0.0186435879182477, 0.6991345469342888, 0.06525255771386695, 0.12053703796243376, 0.8808475851100928, 0.9873981941590319, 0.9600139422211744, 0.9821445940615746, 0.9902454853108502, 0.993437568496566, 0.9697687752512103, 0.9853163266160696, 0.9648518461083087, 0.9066788895590717, 0.07953323592623436, 0.9949038783658635, 0.9614218827316645, 0.07700576528794627, 0.8932668773401766, 0.02310172958638388, 0.9832274411184992, 0.09934122220336818, 0.8940709998303137, 0.48368387123612944, 0.32978445766099734, 0.07694970678756605, 0.10626388080187692, 0.9792349517009079, 0.9290633033571214, 0.2830141185812312, 0.019296417175993036, 0.6946710183357493, 0.40438311481974787, 0.2620402584031966, 0.14234285641655126, 0.18763376527636302, 0.8954100670118441, 0.10210816553643837, 0.034831117507314574, 0.8272390407987211, 0.017415558753657287, 0.11320113189877237, 0.14266272389911283, 0.8559763433946771, 0.9684958188445787, 0.2674008057681338, 0.5278561360617706, 0.13543677175269114, 0.06945475474496982, 0.35165631718214746, 0.21738754153078207, 0.2941125561887052, 0.03836250732896154, 0.09910314393315066, 0.3815503489109521, 0.317513926716107, 0.1680956082614684, 0.11206373884097894, 0.02134547406494837, 0.1764362493131667, 0.29616084706138696, 0.42848803404626196, 0.031506473091636907, 0.06301294618327381, 0.17938378413569317, 0.1865591355011209, 0.5345636767243657, 0.053815135240707954, 0.04305210819256636, 0.9949123942827194, 0.9930142721030779, 0.9748402578577824, 0.1891681319254523, 0.7910667335064369, 0.3759500742348234, 0.025750005084576946, 0.6025501189791005, 0.6702962424122957, 0.29167702598694034, 0.03645962824836754, 0.9694266086215101, 0.18295200533713787, 0.8136549711046395, 0.13408041680040783, 0.026071192155634856, 0.022346736133401306, 0.7709623966023451, 0.04469347226680261, 0.1707343412948578, 0.07256209505031457, 0.06829373651794311, 0.661595572517574, 0.02561015119422867, 0.9926276645937206, 0.13322686235223336, 0.02220447705870556, 0.7938100548487238, 0.049960073382087515, 0.9820497895288917, 0.9739175194013691, 0.3366255447271347, 0.4217958632725543, 0.09733750690905099, 0.1460062603635765, 0.3112868901844484, 0.2702380695007849, 0.085518376424299, 0.33181130052628016, 0.9892137360834956, 0.9731565716518024, 0.9710433940166265, 0.2880001182859271, 0.2560001051430463, 0.09600003942864235, 0.36000014785740886, 0.11657064822159709, 0.6729305601883104, 0.21194663313017653, 0.9860677281935504, 0.9801495305092351, 0.21067844658828438, 0.17775993930886494, 0.11850662620590996, 0.4937776091912915, 0.9786912291507368, 0.6270283601846939, 0.08749232932809682, 0.23914570016346462, 0.02916410977603227, 0.017498465865619362, 0.20391131497126494, 0.7929884471104748, 0.41750978512485065, 0.14314621204280592, 0.2743635730820447, 0.047715404014268645, 0.11133594269996017], \"Topic\": [1, 4, 5, 1, 3, 4, 5, 3, 3, 1, 2, 5, 3, 1, 3, 4, 4, 1, 2, 3, 4, 3, 5, 2, 1, 3, 1, 5, 2, 3, 3, 3, 3, 2, 1, 5, 1, 3, 5, 2, 1, 2, 3, 4, 5, 1, 2, 3, 4, 1, 3, 4, 5, 1, 4, 4, 5, 1, 2, 5, 2, 3, 1, 3, 4, 1, 1, 2, 3, 1, 1, 1, 2, 5, 3, 2, 1, 1, 5, 3, 3, 2, 1, 2, 3, 4, 5, 2, 3, 2, 2, 2, 3, 1, 3, 4, 5, 1, 3, 4, 5, 3, 4, 4, 1, 3, 5, 5, 4, 5, 2, 5, 1, 4, 1, 2, 1, 2, 3, 4, 5, 5, 1, 2, 3, 4, 3, 4, 5, 5, 1, 1, 1, 1, 1, 4, 1, 2, 3, 4, 5, 2, 1, 2, 4, 5, 1, 2, 3, 5, 1, 2, 3, 4, 5, 2, 3, 2, 5, 1, 3, 5, 1, 3, 1, 3, 1, 2, 4, 5, 1, 2, 3, 4, 5, 1, 4, 5, 1, 2, 3, 4, 5, 2, 1, 2, 3, 4, 1, 2, 3, 5, 4, 5, 1, 2, 3, 4, 2, 5, 1, 2, 4, 1, 2, 3, 4, 1, 2, 3, 4, 4, 1, 2, 3, 4, 1, 5, 1, 2, 3, 4, 5, 1, 2, 5, 1, 4, 1, 2, 3, 4, 5, 1, 1, 2, 3, 4, 1, 2, 3, 1, 4, 5, 5, 4, 1, 1, 2, 3, 4, 1, 1, 4, 5, 2, 2, 5, 4, 5, 5, 2, 2, 3, 5, 1, 4, 1, 2, 3, 4, 5, 1, 3, 5, 5, 5, 5, 5, 5, 2, 3, 4, 5, 5, 1, 1, 2, 3, 4, 2, 1, 3, 5, 3, 4, 2, 1, 2, 3, 4, 5, 4, 1, 2, 3, 4, 2, 3, 1, 4, 5, 1, 2, 3, 4, 5, 5, 1, 2, 3, 5, 4, 5, 4, 4, 1, 3, 4, 1, 2, 1, 2, 4, 1, 2, 3, 1, 1, 3, 4, 5, 1, 2, 3, 4, 3, 5, 3, 3, 1, 2, 3, 1, 2, 4, 4, 2, 1, 2, 3, 4, 5, 3, 3, 1, 2, 3, 4, 5, 1, 3, 4, 3, 1, 5, 1, 3, 5, 4, 4, 1, 4, 1, 1, 2, 3, 4, 1, 2, 3, 1, 2, 3, 4, 1, 2, 4, 3, 5, 3, 1, 2, 1, 1, 5, 2, 3, 4, 4, 5, 1, 2, 3, 4, 5, 2, 1, 1, 2, 3, 4, 1, 2, 3, 2, 1, 2, 4, 1, 2, 3, 5, 1, 3, 4, 3, 3, 5, 1, 3, 1, 2, 3, 4, 5, 2, 4, 2, 1, 1, 3, 4, 5, 1, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 3, 4, 4, 4, 4, 3, 3, 4, 5, 1, 4, 2, 3, 5, 3, 2, 3, 1, 2, 3, 4, 2, 5, 1, 2, 4, 1, 2, 3, 4, 1, 5, 1, 2, 3, 4, 1, 4, 3, 1, 2, 3, 4, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 1, 4, 4, 5, 1, 2, 3, 1, 3, 4, 2, 1, 2, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 4, 1, 2, 4, 5, 4, 4, 1, 2, 3, 4, 1, 2, 3, 4, 4, 4, 2, 1, 2, 4, 5, 1, 2, 3, 4, 4, 1, 2, 3, 4, 1, 1, 2, 3, 4, 5, 1, 3, 1, 2, 3, 4, 5], \"Term\": [\"access\", \"access\", \"accounting\", \"act\", \"act\", \"act\", \"act\", \"actor\", \"actress\", \"agreed\", \"agreed\", \"agreed\", \"album\", \"analysts\", \"analysts\", \"anti-virus\", \"apple\", \"around\", \"around\", \"around\", \"around\", \"arrested\", \"arrested\", \"arsenal\", \"artists\", \"artists\", \"asylum\", \"attorney\", \"award\", \"award\", \"awards\", \"awards,\", \"awards.\", \"ball\", \"ban\", \"ban\", \"band\", \"band\", \"bankruptcy\", \"barcelona\", \"bbc\", \"bbc\", \"bbc\", \"bbc\", \"bbc\", \"best\", \"best\", \"best\", \"best\", \"bill\", \"bill\", \"bill\", \"bill\", \"blair\", \"blog\", \"blogs\", \"boeing\", \"boss\", \"boss\", \"boss\", \"box\", \"box\", \"british\", \"british\", \"british\", \"broadband\", \"brown\", \"brown\", \"brown\", \"bt\", \"budget\", \"case\", \"case\", \"case\", \"ceremony\", \"champions\", \"chancellor\", \"charges\", \"charges\", \"chart\", \"charts\", \"chelsea\", \"chief\", \"chief\", \"chief\", \"chief\", \"chief\", \"club\", \"club\", \"club.\", \"clubs\", \"coach\", \"comedy\", \"committee\", \"committee\", \"committee\", \"committee\", \"company\", \"company\", \"company\", \"company\", \"computer\", \"computer\", \"computers\", \"consumer\", \"court\", \"court\", \"courts\", \"criminal\", \"criminal\", \"cup\", \"damages\", \"data\", \"data\", \"debt\", \"defender\", \"director\", \"director\", \"director\", \"director\", \"director\", \"dogs\", \"don't\", \"don't\", \"don't\", \"don't\", \"drama\", \"e-mail\", \"e-mail\", \"ebbers\", \"economic\", \"economy\", \"education\", \"election\", \"eu\", \"eu\", \"european\", \"european\", \"european\", \"european\", \"european\", \"everton\", \"evidence\", \"evidence\", \"evidence\", \"evidence\", \"executive\", \"executive\", \"executive\", \"executive\", \"expected\", \"expected\", \"expected\", \"expected\", \"expected\", \"fa\", \"favourite\", \"ferguson\", \"fiat\", \"figures\", \"figures\", \"filed\", \"film\", \"film\", \"films\", \"films\", \"financial\", \"financial\", \"financial\", \"financial\", \"firm\", \"firm\", \"firm\", \"firm\", \"firm\", \"firms\", \"firms\", \"firms\", \"first\", \"first\", \"first\", \"first\", \"first\", \"football\", \"foreign\", \"foreign\", \"foreign\", \"foreign\", \"former\", \"former\", \"former\", \"former\", \"fraud\", \"fraud\", \"game\", \"game\", \"game\", \"game\", \"gerrard\", \"gm\", \"goal\", \"goal\", \"goal\", \"going\", \"going\", \"going\", \"going\", \"good\", \"good\", \"good\", \"good\", \"google\", \"got\", \"got\", \"got\", \"got\", \"government\", \"government\", \"group\", \"group\", \"group\", \"group\", \"group\", \"growth\", \"guilty\", \"guilty\", \"health\", \"health\", \"help\", \"help\", \"help\", \"help\", \"help\", \"higher\", \"home\", \"home\", \"home\", \"home\", \"howard\", \"howard\", \"howard\", \"human\", \"human\", \"human\", \"hunting\", \"ibm\", \"immigration\", \"including\", \"including\", \"including\", \"including\", \"increase\", \"information\", \"information\", \"information\", \"injury\", \"inquiry\", \"inquiry\", \"internet\", \"internet\", \"jail\", \"jose\", \"judge\", \"judge\", \"judge\", \"labour\", \"labour\", \"last\", \"last\", \"last\", \"last\", \"last\", \"law\", \"law\", \"law\", \"law.\", \"laws.\", \"lawsuit\", \"lawyer\", \"lawyers\", \"league\", \"legal\", \"legal\", \"legal\", \"legislation\", \"liberal\", \"like\", \"like\", \"like\", \"like\", \"liverpool\", \"lord\", \"lord\", \"lord\", \"los\", \"machines\", \"madrid\", \"make\", \"make\", \"make\", \"make\", \"make\", \"malicious\", \"manager\", \"manager\", \"manager\", \"manager\", \"manchester\", \"manchester\", \"market\", \"market\", \"marsh\", \"may\", \"may\", \"may\", \"may\", \"may\", \"mcconnell\", \"men\", \"men\", \"men\", \"men\", \"messages\", \"messages\", \"microsoft\", \"microsoft's\", \"million\", \"million\", \"million\", \"minister\", \"minister\", \"minutes\", \"minutes\", \"minutes\", \"mobile\", \"mourinho\", \"movie\", \"mps\", \"ms\", \"ms\", \"ms\", \"ms\", \"much\", \"much\", \"much\", \"much\", \"murder\", \"murder\", \"music\", \"musical\", \"named\", \"named\", \"named\", \"net\", \"net\", \"net\", \"networks\", \"newcastle\", \"next\", \"next\", \"next\", \"next\", \"next\", \"nominated\", \"nominations\", \"number\", \"number\", \"number\", \"number\", \"officers\", \"online\", \"online\", \"online\", \"oscar\", \"parliament\", \"parliament\", \"party\", \"party\", \"party\", \"pc\", \"pcs\", \"phone\", \"phone\", \"phones\", \"plans\", \"plans\", \"plans\", \"plans\", \"play\", \"play\", \"play\", \"player\", \"player\", \"player\", \"player\", \"players\", \"players\", \"players\", \"police\", \"police\", \"pop\", \"premiership\", \"premiership\", \"prices\", \"prime\", \"prison\", \"prize\", \"prize\", \"program\", \"programs\", \"prosecutors\", \"public\", \"public\", \"public\", \"public\", \"public\", \"rangers\", \"rates\", \"real\", \"real\", \"real\", \"real\", \"record\", \"record\", \"record\", \"referee\", \"report\", \"report\", \"report\", \"rights\", \"rights\", \"rights\", \"rights\", \"rise\", \"rise\", \"rise\", \"rock\", \"russian\", \"russian\", \"sales\", \"sales\", \"says\", \"says\", \"says\", \"says\", \"says\", \"search\", \"search\", \"season.\", \"secretary\", \"security\", \"security\", \"security\", \"sentence\", \"service\", \"service\", \"set\", \"set\", \"set\", \"set\", \"show\", \"show\", \"show\", \"show\", \"side\", \"side\", \"singer\", \"singles\", \"site\", \"sites\", \"software\", \"software.\", \"song\", \"songs\", \"spam\", \"spam\", \"spending\", \"spyware\", \"star\", \"star\", \"star\", \"starring\", \"stars\", \"stars\", \"still\", \"still\", \"still\", \"still\", \"striker\", \"sullivan\", \"system\", \"system\", \"system\", \"take\", \"take\", \"take\", \"take\", \"tax\", \"tax\", \"team\", \"team\", \"team\", \"team\", \"technology\", \"technology\", \"theatre\", \"think\", \"think\", \"think\", \"think\", \"three\", \"three\", \"three\", \"three\", \"three\", \"time\", \"time\", \"time\", \"time\", \"time\", \"took\", \"took\", \"took\", \"took\", \"took\", \"top\", \"top\", \"top\", \"top\", \"top\", \"tories\", \"tory\", \"traffic\", \"trial\", \"trial\", \"tv\", \"tv\", \"tv\", \"uk\", \"uk\", \"uk\", \"ukip\", \"united\", \"united\", \"use\", \"use\", \"use\", \"use\", \"use\", \"used\", \"used\", \"used\", \"used\", \"used\", \"users\", \"using\", \"using\", \"using\", \"using\", \"virus\", \"viruses\", \"want\", \"want\", \"want\", \"want\", \"way\", \"way\", \"way\", \"way\", \"web\", \"websites\", \"wenger\", \"whether\", \"whether\", \"whether\", \"whether\", \"win\", \"win\", \"win\", \"windows\", \"wireless\", \"without\", \"without\", \"without\", \"without\", \"women\", \"year\", \"year\", \"year\", \"year\", \"year\", \"year's\", \"year's\", \"years\", \"years\", \"years\", \"years\", \"years\"]}, \"R\": 30, \"tinfo\": {\"Freq\": [338.0, 469.0, 379.0, 149.0, 197.0, 131.0, 133.0, 268.0, 195.0, 213.0, 189.0, 197.0, 111.0, 155.0, 184.0, 123.0, 178.0, 178.0, 293.0, 111.0, 207.0, 157.0, 199.0, 200.0, 180.0, 147.0, 131.0, 141.0, 104.0, 183.0, 212.4863133119164, 205.470616280967, 141.81125283738655, 141.317811524991, 136.34661422092265, 128.62417179118705, 114.22134092732531, 107.43382555164662, 105.74482575789212, 104.91311337117644, 104.20960191036498, 98.89832218352947, 90.30029030977892, 85.44465210390611, 79.76850059280859, 71.57005066579308, 200.16654271120484, 70.9458873024058, 68.78252887191522, 66.8472443260744, 64.85709724525856, 63.12752954353987, 61.50162487561248, 203.42506597325857, 59.13643993903283, 59.00120935223097, 57.4429149792676, 54.47530028852131, 53.21685265163727, 52.217202107644646, 79.64492574018897, 162.86604875647834, 80.63731357770568, 130.65148438135932, 306.46147985922033, 105.80792938138545, 105.60195395801281, 142.76915134731559, 113.67351324570927, 132.06920801338913, 110.23070307498243, 107.36465270724275, 103.25268791415242, 238.58241190060582, 110.23409851839752, 214.8392399792644, 188.35761758307274, 137.10112870642882, 148.6853897694185, 213.10806878991326, 148.68900725031327, 142.32564506815612, 137.68134417151504, 160.50486962752896, 119.7572746782936, 143.38206982953298, 132.43295218289916, 144.9388469522185, 117.58900946120478, 124.73861595684409, 120.42553466865029, 119.76283839219242, 177.29853455525722, 156.7779138971856, 146.6949789427791, 135.61958824292535, 122.32444220665249, 113.80475063336296, 86.74858041803988, 79.73331887083039, 76.49623204261633, 194.07479688018216, 59.89789861457687, 58.22089545252719, 58.17595040242098, 50.50325006211204, 48.807153152489285, 48.377402965731676, 45.550641608514724, 44.26932823252133, 43.297981049805486, 43.03950451913098, 41.16367532343692, 40.94920229436261, 127.23404124931989, 38.745581232349615, 38.144467327780994, 38.060009362544605, 37.80505304842312, 36.897029773621895, 35.693580962876325, 35.4717175595189, 81.94301568789338, 105.59540868693459, 163.5559343684377, 84.59710597760188, 94.76091010760479, 169.4026443551365, 125.63319521070228, 220.86797620882564, 74.08354991461486, 94.85859092523695, 78.7398036016602, 126.57086620516972, 135.33678805824292, 113.64886970329107, 151.65806517211763, 122.648083520528, 108.39832947652991, 94.36308945121944, 143.31768607719678, 142.7559971223821, 119.44911646696904, 104.46588695964205, 111.26840707241855, 101.14237217666819, 94.30372737913301, 89.89610757721698, 194.34943664640542, 93.70991013833519, 92.90887649386639, 88.03752661112121, 85.24349083975915, 75.9467391113036, 71.78441310162901, 64.50614394924558, 59.44841767203173, 59.18774257857942, 56.90049044038715, 54.40268392362571, 48.812653763894296, 47.55272530116112, 45.225451826259544, 331.119840403722, 42.11999725317133, 40.43392062070158, 40.36176405753145, 106.32939550266698, 38.58461634148607, 37.62565530983741, 37.33388755069621, 36.47623400341841, 36.14782189479269, 121.73549441320611, 33.85552223325464, 33.80572067645594, 32.13395622418932, 31.344494994283895, 59.61650593257396, 389.7576553795097, 116.21625649565458, 71.41823381302795, 62.1977893092521, 47.60024493515475, 150.45273973409638, 53.86807305106637, 62.405808233294074, 69.68132058565247, 149.32251752006408, 116.67029231371697, 158.4002557922347, 101.68953326884912, 94.01922940971257, 155.41272982382748, 91.47322794695208, 151.83934661250458, 104.24835218863181, 92.44315715727257, 82.49482491378424, 86.79572595893363, 73.499923260343, 81.93642550759277, 67.90125094885077, 69.43169194381727, 196.34922390567357, 153.91080453550154, 106.39322385946834, 88.49335572849789, 73.62245877341847, 66.62407387778426, 65.62540535882952, 64.811907153606, 62.35574207407154, 56.935377854727044, 51.89144895000255, 50.89169603359007, 50.27270789053628, 48.706780345145525, 44.99629835519885, 42.46371252117296, 41.00662421614464, 40.03558235051674, 39.70361382350795, 37.87425969116121, 37.37818014202789, 36.88441101521272, 36.43533919934079, 36.015765302422885, 35.17877007217762, 32.8712460001349, 127.49498535076904, 32.198826565682396, 31.766192205257706, 30.819838556674426, 119.80320555476727, 134.22857763085307, 88.61877281739612, 128.67738681985836, 162.8848760080584, 158.98447571799645, 161.61397325130145, 178.15678663854564, 207.24942822456453, 143.18861348235257, 109.38088183729246, 56.85786348761257, 105.61705465000895, 56.71291598976755, 154.54611383509766, 108.2480475789869, 95.4776674462217, 71.40010798793972, 110.3776114806362, 85.71123019591482, 96.81363154292559, 99.12816921923782, 76.69710204543159, 75.47006161280619, 75.9533462431537, 70.34676091235491, 42.02441809914927, 127.59390214442068, 32.966092797467944, 29.77573399238155, 107.36250774893777, 24.900084883106807, 24.017073797103166, 23.96994968102708, 23.599291060784534, 23.524141589555942, 22.514735840712234, 142.2414408446976, 20.81575096767737, 20.751122436014413, 58.95577484429064, 19.416255736979174, 18.947859128295697, 18.90523346714704, 18.79944754856446, 18.68635404500288, 18.282859913559072, 18.18958246808482, 17.473520588849198, 16.724233581259824, 16.594346563620977, 15.880214876644413, 15.669104935976888, 15.261518404357139, 14.862109405875293, 14.55084337199769, 34.05732105192827, 44.39618177273146, 111.81820451603652, 35.79380961401682, 98.86763807159876, 28.7196921218631, 38.96542197696023, 84.59544903550699, 27.82430390576684, 46.40030843737934, 32.34755094875456, 71.213993514199, 67.55485468888367, 55.964380238404075, 31.78525162731919, 31.00631515886161, 37.82697644461753, 36.51340264610153, 31.73153498768067, 62.91625402418606, 59.21376434942602, 49.76532416590661, 38.284563106571994, 71.85232607852286, 52.520115633786126, 38.30491887084204, 44.716976370664874, 46.7076542234992, 39.45363639925313, 40.21039683634915, 37.38129479646851, 47.27148762740068, 41.44071061508175, 37.98706163782915], \"loglift\": [30.0, 29.0, 28.0, 27.0, 26.0, 25.0, 24.0, 23.0, 22.0, 21.0, 20.0, 19.0, 18.0, 17.0, 16.0, 15.0, 14.0, 13.0, 12.0, 11.0, 10.0, 9.0, 8.0, 7.0, 6.0, 5.0, 4.0, 3.0, 2.0, 1.0, 0.9158, 0.9157, 0.9139, 0.9139, 0.9137, 0.9134, 0.9126, 0.9122, 0.912, 0.912, 0.9119, 0.9115, 0.9108, 0.9103, 0.9096, 0.9085, 0.9084, 0.9084, 0.908, 0.9077, 0.9073, 0.907, 0.9067, 0.9062, 0.9061, 0.9061, 0.9058, 0.905, 0.9047, 0.9044, 0.8865, 0.8421, 0.8777, 0.8289, 0.7071, 0.8303, 0.8219, 0.7713, 0.8062, 0.7596, 0.7926, 0.7953, 0.8021, 0.5178, 0.7685, 0.452, 0.4111, 0.5037, 0.3968, -0.0902, 0.3422, 0.349, 0.3264, 0.0167, 0.5397, -0.0413, 0.1965, -0.3428, 0.5323, 0.0121, 0.0525, -0.0988, 1.6111, 1.6104, 1.6099, 1.6093, 1.6085, 1.6079, 1.605, 1.6039, 1.6034, 1.6011, 1.5996, 1.5991, 1.5991, 1.5964, 1.5957, 1.5955, 1.5942, 1.5935, 1.593, 1.5929, 1.5918, 1.5917, 1.5903, 1.5902, 1.5898, 1.5898, 1.5896, 1.5889, 1.588, 1.5878, 1.5838, 1.5369, 1.5034, 1.5303, 1.4877, 1.4132, 1.4386, 1.3322, 1.4937, 1.4259, 1.444, 1.2176, 1.1588, 1.188, 0.9759, 0.8768, 0.8893, 0.9999, 0.3434, 0.2067, 0.4736, 0.7583, 0.3973, 0.655, 0.5055, 0.5066, 1.6699, 1.6642, 1.6641, 1.6635, 1.6632, 1.6617, 1.6609, 1.6594, 1.658, 1.658, 1.6573, 1.6565, 1.6544, 1.6538, 1.6527, 1.6524, 1.6511, 1.6501, 1.6501, 1.6494, 1.6489, 1.6483, 1.6481, 1.6474, 1.6472, 1.6461, 1.6453, 1.6453, 1.6438, 1.643, 1.6176, 1.4889, 1.5641, 1.5685, 1.5707, 1.6043, 1.3202, 1.5607, 1.5076, 1.4386, 1.051, 1.1657, 0.9395, 1.0691, 1.0131, 0.4825, 0.9448, 0.3264, 0.4454, 0.4561, 0.609, 0.3348, 0.9238, 0.2436, 0.8262, 0.388, 1.8908, 1.8893, 1.8861, 1.884, 1.8815, 1.8799, 1.8797, 1.8795, 1.8788, 1.8772, 1.8753, 1.8749, 1.8746, 1.874, 1.8721, 1.8707, 1.8698, 1.8692, 1.8689, 1.8676, 1.8672, 1.8669, 1.8665, 1.8662, 1.8654, 1.8633, 1.863, 1.8626, 1.8622, 1.8611, 1.8503, 1.8439, 1.8509, 1.8172, 1.8064, 1.7487, 1.7385, 1.7164, 1.6375, 1.6668, 1.7079, 1.8054, 1.6499, 1.7934, 1.4804, 1.5344, 1.4089, 1.4919, 0.6192, 1.0307, 0.7913, 0.5611, 1.1481, 1.197, 0.9001, 1.0561, 2.699, 2.6959, 2.6915, 2.6878, 2.6871, 2.6803, 2.6786, 2.6785, 2.6778, 2.6776, 2.6755, 2.6741, 2.6714, 2.6713, 2.67, 2.6676, 2.6661, 2.666, 2.6657, 2.6653, 2.664, 2.6637, 2.6612, 2.6583, 2.6578, 2.6548, 2.6539, 2.652, 2.6501, 2.6485, 2.628, 2.6183, 2.5512, 2.6092, 2.5059, 2.6035, 2.5656, 2.4511, 2.5988, 2.5011, 2.5505, 2.3401, 2.3526, 2.2367, 2.4577, 2.467, 2.2975, 2.2521, 2.3687, 1.5725, 1.507, 1.7353, 2.0485, 1.0638, 1.5311, 2.0341, 1.6988, 1.254, 1.7316, 1.602, 1.8517, 0.2112, 1.1152, 1.2307], \"logprob\": [30.0, 29.0, 28.0, 27.0, 26.0, 25.0, 24.0, 23.0, 22.0, 21.0, 20.0, 19.0, 18.0, 17.0, 16.0, 15.0, 14.0, 13.0, 12.0, 11.0, 10.0, 9.0, 8.0, 7.0, 6.0, 5.0, 4.0, 3.0, 2.0, 1.0, -6.0368, -6.0704, -6.4412, -6.4447, -6.4805, -6.5388, -6.6575, -6.7188, -6.7347, -6.7426, -6.7493, -6.8016, -6.8925, -6.9478, -7.0166, -7.125, -6.0965, -7.1338, -7.1647, -7.1933, -7.2235, -7.2505, -7.2766, -6.0804, -7.3158, -7.3181, -7.3449, -7.3979, -7.4213, -7.4403, -7.0181, -6.3028, -7.0057, -6.5232, -5.6706, -6.7341, -6.736, -6.4345, -6.6624, -6.5124, -6.6931, -6.7195, -6.7585, -5.921, -6.6931, -6.0258, -6.1573, -6.475, -6.3939, -6.0339, -6.3938, -6.4376, -6.4707, -6.3174, -6.6102, -6.4302, -6.5096, -6.4194, -6.6285, -6.5695, -6.6047, -6.6102, -5.5203, -5.6433, -5.7098, -5.7883, -5.8915, -5.9637, -6.2352, -6.3195, -6.3609, -5.4299, -6.6055, -6.6339, -6.6347, -6.7761, -6.8103, -6.8191, -6.8793, -6.9079, -6.9301, -6.9361, -6.9806, -6.9858, -5.8521, -7.0412, -7.0568, -7.059, -7.0657, -7.09, -7.1232, -7.1294, -6.2921, -6.0386, -5.601, -6.2603, -6.1468, -5.5659, -5.8648, -5.3006, -6.393, -6.1458, -6.332, -5.8574, -5.7904, -5.9651, -5.6765, -5.8889, -6.0124, -6.151, -5.7331, -5.737, -5.9153, -6.0493, -5.9862, -6.0816, -6.1516, -6.1995, -5.3705, -6.0999, -6.1085, -6.1624, -6.1946, -6.3101, -6.3665, -6.4734, -6.555, -6.5594, -6.5988, -6.6437, -6.7521, -6.7783, -6.8285, -4.8377, -6.8996, -6.9405, -6.9423, -5.9736, -6.9873, -7.0125, -7.0202, -7.0435, -7.0525, -5.8383, -7.118, -7.1195, -7.1702, -7.1951, -6.5522, -4.6746, -5.8847, -6.3716, -6.5098, -6.7773, -5.6265, -6.6536, -6.5065, -6.3962, -5.634, -5.8808, -5.575, -6.0182, -6.0966, -5.5941, -6.1241, -5.6173, -5.9934, -6.1135, -6.2274, -6.1766, -6.3429, -6.2342, -6.4221, -6.3998, -5.1389, -5.3825, -5.7517, -5.9359, -6.1199, -6.2198, -6.2349, -6.2473, -6.286, -6.3769, -6.4697, -6.4891, -6.5014, -6.533, -6.6122, -6.6702, -6.7051, -6.7291, -6.7374, -6.7846, -6.7977, -6.811, -6.8233, -6.8349, -6.8584, -6.9262, -5.5707, -6.9469, -6.9604, -6.9907, -5.633, -5.5193, -5.9345, -5.5615, -5.3258, -5.35, -5.3336, -5.2362, -5.0849, -5.4547, -5.724, -6.3783, -5.759, -6.3808, -5.3783, -5.7344, -5.8599, -6.1505, -5.7149, -5.9678, -5.846, -5.8224, -6.079, -6.0951, -6.0887, -6.1654, -5.8502, -4.7396, -6.093, -6.1948, -4.9122, -6.3736, -6.4097, -6.4117, -6.4272, -6.4304, -6.4743, -4.6309, -6.5527, -6.5559, -5.5117, -6.6223, -6.6468, -6.649, -6.6546, -6.6607, -6.6825, -6.6876, -6.7278, -6.7716, -6.7794, -6.8234, -6.8368, -6.8631, -6.8896, -6.9108, -6.0604, -5.7953, -4.8716, -6.0107, -4.9947, -6.2309, -5.9258, -5.1506, -6.2625, -5.7511, -6.1119, -5.3228, -5.3755, -5.5637, -6.1295, -6.1543, -5.9554, -5.9908, -6.1311, -5.4467, -5.5073, -5.6811, -5.9434, -5.3138, -5.6273, -5.9429, -5.7881, -5.7445, -5.9133, -5.8943, -5.9673, -5.7325, -5.8642, -5.9512], \"Total\": [338.0, 469.0, 379.0, 149.0, 197.0, 131.0, 133.0, 268.0, 195.0, 213.0, 189.0, 197.0, 111.0, 155.0, 184.0, 123.0, 178.0, 178.0, 293.0, 111.0, 207.0, 157.0, 199.0, 200.0, 180.0, 147.0, 131.0, 141.0, 104.0, 183.0, 213.2844434163592, 206.2687463854098, 142.60938294182935, 142.1159416294338, 137.14474432536545, 129.42230189562986, 115.01947103176809, 108.2319556560894, 106.54295586233489, 105.71124347561921, 105.00773201480776, 99.69645228797225, 91.09842041422169, 86.24278220834888, 80.56663069725137, 72.36818077023585, 202.41326154693502, 71.74401740684857, 69.580658976358, 67.64537443051718, 65.65522734970133, 63.92565964798266, 62.29975498005527, 206.15991044703014, 59.934570043475624, 59.79933945667376, 58.24104508371039, 55.2734303929641, 54.01498275608006, 53.015332212087436, 82.32294325362955, 175.9904848281029, 84.08626950930402, 143.0477704256725, 379.0050638978961, 115.68529856181522, 116.43276092541323, 165.58604705887242, 127.31596862702243, 154.97705141571768, 125.15401970818078, 121.57135804694805, 116.12620038539443, 356.55876443507253, 128.2066816444034, 342.887202002587, 313.1841619690246, 207.80824827411706, 250.79105986888396, 584.9572639533194, 264.8531133309931, 251.79677493058875, 249.16045646654507, 395.8917892742952, 175.09963450177992, 374.78671008468655, 272.90552331764434, 512.189884249235, 173.2006841327669, 309.11280767921835, 286.59505604717833, 331.5642275573701, 178.35249613591589, 157.83187547784428, 147.74894052343777, 136.673549823584, 123.37840378731111, 114.85871221402158, 87.8025419986985, 80.78728045148901, 77.55019362327495, 197.20118736300483, 60.95186019523551, 59.27485703318583, 59.229911983079624, 51.55721164277068, 49.86111473314793, 49.43136454639032, 46.60460318917337, 45.323289813179976, 44.35194263046413, 44.09346609978962, 42.21763690409556, 42.00316387502125, 130.68074698222887, 39.79954281300826, 39.19842890843964, 39.11397094320325, 38.85901462908176, 37.95099135428054, 36.74754254353497, 36.525679140177544, 84.71521743092642, 114.40545073844599, 183.24648702592597, 92.26280071433852, 107.85066747742337, 207.7047471000652, 150.1767238002897, 293.67108765957516, 83.81319779646984, 114.83984110357629, 93.6165137631102, 188.72675356646127, 214.01307720662524, 174.5378879968499, 287.95724746905796, 257.14462657019135, 224.42925651826576, 174.91031428617953, 512.189884249235, 584.9572639533194, 374.78671008468655, 246.56476996503332, 376.8001293221928, 264.6980623148953, 286.59505604717833, 272.90552331764434, 195.37265803288184, 94.7331315248116, 93.9320978803428, 89.06074799759762, 86.26671222623555, 76.96996049778001, 72.80763448810542, 65.52936533572199, 60.471639058508146, 60.21096396505583, 57.92371182686357, 55.425905310102124, 49.83587515037071, 48.57594668763753, 46.24867321273596, 338.7222856356, 43.14321863964774, 41.45714200717799, 41.38498544400787, 109.0953866274128, 39.60783772796248, 38.64887669631383, 38.357108937172626, 37.49945538989483, 37.17104328126911, 125.31722932121957, 34.878743619731054, 34.828942062932356, 33.157177610665734, 32.367716380760314, 63.14439695304959, 469.50499436392346, 129.8604067189928, 79.44878897874584, 69.04284449555259, 51.09485360241789, 214.55097685810455, 60.39788787495478, 73.78573016337884, 88.2736693769865, 278.7319948729478, 194.17471893994954, 330.5246368146387, 186.397351671712, 182.27551691902912, 512.189884249235, 189.87412786603738, 584.9572639533194, 356.55876443507253, 312.8054143359048, 239.56189371665312, 331.5642275573701, 155.79692669786252, 342.887202002587, 158.69754718204882, 251.49111168400802, 197.45570971994033, 155.0172903497683, 107.4997096737351, 89.59984154276465, 74.72894458768523, 67.73055969205102, 66.73189117309629, 65.91839296787276, 63.46222788833831, 58.04186366899381, 52.99793476426932, 51.99818184785684, 51.37919370480305, 49.813266159412294, 46.10278416946562, 43.57019833543973, 42.113110030411406, 41.14206816478351, 40.81009963777472, 38.980745505427976, 38.484665956294656, 37.99089682947949, 37.54182501360756, 37.122251116689654, 36.28525588644439, 33.97773181440167, 131.8289523303466, 33.305312379949164, 32.87267801952447, 31.926324370941188, 125.45221349808786, 141.464370174568, 92.74893939026443, 139.28700140053394, 178.22160843939218, 184.2831863635204, 189.25756681257297, 213.2928229772575, 268.49558540371794, 180.1438506939188, 132.07574718806083, 62.27546687865661, 135.14177525747496, 62.86679954324265, 234.28209987889957, 155.46927559859895, 155.4659875416262, 106.99991237794552, 395.8917892742952, 203.71007964684466, 292.3348296039043, 376.8001293221928, 162.09096639612181, 151.89024087753782, 205.70944557157793, 163.0003172362521, 43.20918820204422, 131.5976743538209, 34.15086290036289, 30.960504095276498, 111.70340221711282, 26.084854986001755, 25.201843899998114, 25.15471978392203, 24.784061163679482, 24.70891169245089, 23.699505943607182, 149.93075690410848, 22.00052107057232, 21.93589253890936, 62.401637905844204, 20.601025839874122, 20.132629231190645, 20.090003570041986, 19.984217651459407, 19.871124147897827, 19.46763001645402, 19.374352570979767, 18.658290691744146, 17.909003684154772, 17.779116666515925, 17.06498497953936, 16.853875038871834, 16.446288507252085, 16.04687950877024, 15.735613474892636, 37.59483156647954, 49.48151884909539, 133.2760106342517, 40.2593496377559, 123.30160949416214, 32.48807570239502, 45.781066337160055, 111.45166564830241, 31.62433552354192, 58.14932931903614, 38.58281475812213, 104.83764605582857, 98.20726480846918, 91.35709956739348, 41.599817847378986, 40.2037395231764, 58.10734237804621, 58.696451246067376, 45.39471414860213, 199.54777728111748, 200.5161076398912, 134.13033272295286, 75.4421241934196, 379.0050638978961, 173.621392827264, 76.57276136405886, 124.99994866064301, 203.71007964684466, 106.72779920632235, 123.8312597450224, 89.6792677011986, 584.9572639533194, 207.6464031624635, 169.58563571213202], \"Category\": [\"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\"], \"Term\": [\"film\", \"best\", \"government\", \"law\", \"users\", \"court\", \"lord\", \"use\", \"music\", \"net\", \"technology\", \"club\", \"police\", \"software\", \"security\", \"legal\", \"chelsea\", \"information\", \"game\", \"rights\", \"united\", \"league\", \"former\", \"company\", \"using\", \"cup\", \"computer\", \"internet\", \"case\", \"players\", \"blair\", \"mobile\", \"growth\", \"economic\", \"prime\", \"election\", \"economy\", \"secretary\", \"spending\", \"broadband\", \"prices\", \"tory\", \"phones\", \"increase\", \"chancellor\", \"tories\", \"labour\", \"mps\", \"education\", \"liberal\", \"rates\", \"consumer\", \"higher\", \"minister\", \"budget\", \"debt\", \"women\", \"asylum\", \"immigration\", \"bt\", \"health\", \"market\", \"analysts\", \"party\", \"government\", \"figures\", \"rise\", \"plans\", \"tax\", \"report\", \"brown\", \"foreign\", \"eu\", \"uk\", \"howard\", \"year\", \"next\", \"public\", \"set\", \"last\", \"may\", \"says\", \"much\", \"make\", \"sales\", \"time\", \"still\", \"first\", \"expected\", \"take\", \"home\", \"bbc\", \"chelsea\", \"league\", \"cup\", \"arsenal\", \"football\", \"liverpool\", \"champions\", \"ball\", \"fa\", \"club\", \"mourinho\", \"ferguson\", \"striker\", \"newcastle\", \"coach\", \"wenger\", \"gerrard\", \"season.\", \"madrid\", \"clubs\", \"everton\", \"referee\", \"manchester\", \"injury\", \"ukip\", \"defender\", \"club.\", \"barcelona\", \"rangers\", \"jose\", \"premiership\", \"boss\", \"players\", \"goal\", \"side\", \"united\", \"manager\", \"game\", \"minutes\", \"team\", \"player\", \"win\", \"play\", \"got\", \"think\", \"good\", \"don't\", \"real\", \"first\", \"last\", \"time\", \"want\", \"like\", \"going\", \"home\", \"still\", \"music\", \"awards\", \"actor\", \"album\", \"song\", \"singer\", \"rock\", \"chart\", \"comedy\", \"actress\", \"pop\", \"musical\", \"starring\", \"movie\", \"oscar\", \"film\", \"nominated\", \"songs\", \"ceremony\", \"band\", \"los\", \"favourite\", \"drama\", \"singles\", \"theatre\", \"award\", \"awards.\", \"awards,\", \"nominations\", \"charts\", \"prize\", \"best\", \"star\", \"films\", \"named\", \"artists\", \"show\", \"stars\", \"box\", \"year's\", \"top\", \"tv\", \"number\", \"including\", \"director\", \"first\", \"british\", \"last\", \"uk\", \"three\", \"million\", \"bbc\", \"record\", \"year\", \"took\", \"years\", \"users\", \"software\", \"microsoft\", \"site\", \"sites\", \"web\", \"pc\", \"windows\", \"networks\", \"virus\", \"machines\", \"google\", \"websites\", \"programs\", \"computers\", \"pcs\", \"malicious\", \"program\", \"wireless\", \"traffic\", \"spyware\", \"viruses\", \"anti-virus\", \"software.\", \"apple\", \"microsoft's\", \"computer\", \"blog\", \"ibm\", \"blogs\", \"search\", \"internet\", \"e-mail\", \"online\", \"information\", \"security\", \"technology\", \"net\", \"use\", \"using\", \"phone\", \"messages\", \"data\", \"spam\", \"used\", \"system\", \"service\", \"access\", \"make\", \"firm\", \"way\", \"like\", \"firms\", \"without\", \"help\", \"around\", \"hunting\", \"court\", \"bankruptcy\", \"fiat\", \"police\", \"lawyer\", \"ebbers\", \"prison\", \"filed\", \"officers\", \"legislation\", \"law\", \"law.\", \"sentence\", \"russian\", \"courts\", \"lawyers\", \"boeing\", \"attorney\", \"mcconnell\", \"lawsuit\", \"sullivan\", \"prosecutors\", \"gm\", \"damages\", \"marsh\", \"jail\", \"accounting\", \"laws.\", \"dogs\", \"charges\", \"fraud\", \"lord\", \"arrested\", \"legal\", \"guilty\", \"ban\", \"rights\", \"murder\", \"trial\", \"inquiry\", \"case\", \"bill\", \"human\", \"parliament\", \"judge\", \"evidence\", \"men\", \"criminal\", \"former\", \"company\", \"ms\", \"agreed\", \"government\", \"chief\", \"committee\", \"whether\", \"firm\", \"financial\", \"executive\", \"act\", \"last\", \"european\", \"group\"]}};\n",
       "\n",
       "function LDAvis_load_lib(url, callback){\n",
       "  var s = document.createElement('script');\n",
       "  s.src = url;\n",
       "  s.async = true;\n",
       "  s.onreadystatechange = s.onload = callback;\n",
       "  s.onerror = function(){console.warn(\"failed to load library \" + url);};\n",
       "  document.getElementsByTagName(\"head\")[0].appendChild(s);\n",
       "}\n",
       "\n",
       "if(typeof(LDAvis) !== \"undefined\"){\n",
       "   // already loaded: just create the visualization\n",
       "   !function(LDAvis){\n",
       "       new LDAvis(\"#\" + \"ldavis_el289547981492804887376815\", ldavis_el289547981492804887376815_data);\n",
       "   }(LDAvis);\n",
       "}else if(typeof define === \"function\" && define.amd){\n",
       "   // require.js is available: use it to load d3/LDAvis\n",
       "   require.config({paths: {d3: \"https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min\"}});\n",
       "   require([\"d3\"], function(d3){\n",
       "      window.d3 = d3;\n",
       "      LDAvis_load_lib(\"https://cdn.rawgit.com/bmabey/pyLDAvis/files/ldavis.v1.0.0.js\", function(){\n",
       "        new LDAvis(\"#\" + \"ldavis_el289547981492804887376815\", ldavis_el289547981492804887376815_data);\n",
       "      });\n",
       "    });\n",
       "}else{\n",
       "    // require.js not available: dynamically load d3 & LDAvis\n",
       "    LDAvis_load_lib(\"https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js\", function(){\n",
       "         LDAvis_load_lib(\"https://cdn.rawgit.com/bmabey/pyLDAvis/files/ldavis.v1.0.0.js\", function(){\n",
       "                 new LDAvis(\"#\" + \"ldavis_el289547981492804887376815\", ldavis_el289547981492804887376815_data);\n",
       "            })\n",
       "         });\n",
       "}\n",
       "</script>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "doc_topic, topic_term, doc_lengths, term_frequency, vocab = dtm_model.dtm_vis(time=0, corpus=corpus)\n",
    "vis_wrapper = pyLDAvis.prepare(topic_term_dists=topic_term, doc_topic_dists=doc_topic, doc_lengths=doc_lengths, vocab=vocab, term_frequency=term_frequency)\n",
    "pyLDAvis.display(vis_wrapper)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Now let us do the same for the python DTM."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "In particular, look at topic 2 of the wrapper and topic 3 of the python port. Notice how they are both about football."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<link rel=\"stylesheet\" type=\"text/css\" href=\"https://cdn.rawgit.com/bmabey/pyLDAvis/files/ldavis.v1.0.0.css\">\n",
       "\n",
       "\n",
       "<div id=\"ldavis_el289547981512009113565943\"></div>\n",
       "<script type=\"text/javascript\">\n",
       "\n",
       "var ldavis_el289547981512009113565943_data = {\"mdsDat\": {\"y\": [-0.0924817625289708, -0.14060007482808398, 0.04080754892621088, 0.08307097362508645, 0.10920331480575753], \"Freq\": [25.282490623561728, 21.18587781439987, 19.93234677184514, 18.62743522482628, 14.971849565366991], \"topics\": [1, 2, 3, 4, 5], \"cluster\": [1, 1, 1, 1, 1], \"x\": [-0.07640428157103613, 0.006635158421484213, 0.20812017317239928, -0.01846066002507559, -0.11989038999777214]}, \"lambda.step\": 0.01, \"topic.order\": [1, 5, 3, 2, 4], \"plot.opts\": {\"xlab\": \"PC1\", \"ylab\": \"PC2\"}, \"token.table\": {\"Freq\": [0.9798647125813351, 0.36408713856304004, 0.09476240592736658, 0.05486244553689645, 0.10473739602498412, 0.3840371187582751, 0.0827083011947814, 0.2894790541817349, 0.0413541505973907, 0.5479424954154268, 0.031015612948043024, 0.2069830787104046, 0.7843569298499543, 0.9654146446750225, 0.1746383435619388, 0.8208002147411124, 0.010533040186010737, 0.9795727372989985, 0.9693824053206271, 0.776692075048982, 0.01078738993123586, 0.01078738993123586, 0.07551172951865102, 0.12944867917483033, 0.9674649492660171, 0.9792755205298482, 0.9992783403181245, 0.9678449954915606, 0.006772273298964837, 0.02031681989689451, 0.9752073550509365, 0.03158066024070884, 0.9790004674619741, 0.9520112743813927, 0.9590664359746464, 0.05260164399034616, 0.017533881330115388, 0.7890246598551924, 0.1402710506409231, 0.93886971509124, 0.05029659187988785, 0.9744261922368314, 0.9519702469006963, 0.03274787940546178, 0.36841364331144505, 0.589461829298312, 0.023143779454656475, 0.9488949576409155, 0.023143779454656475, 0.9629066722123311, 0.007835828782076162, 0.007835828782076162, 0.971642768977444, 0.015671657564152324, 0.8959684142327231, 0.021164608210221807, 0.014109738806814537, 0.049384085823850885, 0.028219477613629074, 0.048298021002487986, 0.3466093271943255, 0.15341724318437358, 0.3380861470174159, 0.11080134229982537, 0.9916922641253992, 0.03053549746458591, 0.01744885569404909, 0.10469313416429454, 0.3729692904602993, 0.47548131766283774, 0.9653241783609572, 0.038514800807447076, 0.20541227097305106, 0.038514800807447076, 0.667589880662416, 0.06419133467907846, 0.008604610107199973, 0.9809255522207969, 0.008604610107199973, 0.004302305053599987, 0.9715144304042546, 0.9643844830113208, 0.9786433047394681, 0.9644346015575166, 0.04050395578381561, 0.016201582313526246, 0.9396917741845221, 0.9761256280205882, 0.026794751704867854, 0.10717900681947141, 0.12057638267190535, 0.736855671883866, 0.9685716494775668, 0.05393373360005934, 0.28437786807304016, 0.009806133381828971, 0.4265668021095603, 0.22554106778206634, 0.95748305588021, 0.041403046482745204, 0.024841827889647124, 0.008280609296549042, 0.9191476319169436, 0.021062352440066358, 0.8705772341894094, 0.06318705732019907, 0.03510392073344393, 0.014041568293377571, 0.08442213393734084, 0.10130656072480901, 0.8104524857984721, 0.7004720194694565, 0.08561324682404467, 0.038915112192747583, 0.09339626926259419, 0.07783022438549517, 0.03820418971965537, 0.9551047429913843, 0.9514546547330135, 1.0120736471506868, 0.9576780288206906, 0.010743596261146121, 0.021487192522292243, 0.9561800672420048, 0.03364361785284709, 0.9308067605954362, 0.011214539284282364, 0.011214539284282364, 0.011214539284282364, 0.8678777484830977, 0.12804753666144064, 0.00533980558007465, 0.0106796111601493, 0.977184421153661, 0.9608039294643927, 0.12799943814074374, 0.17722999127179903, 0.019692221252422114, 0.1575377700193769, 0.521843863189186, 0.8814477908284074, 0.028433799704142174, 0.04265069955621326, 0.04265069955621326, 0.9412195058442788, 0.02852180320740239, 1.001167136270622, 0.018795309269093813, 0.009397654634546906, 0.9491631180892375, 0.023494136586367266, 0.024376961386131574, 0.975078455445263, 0.020163102457980708, 0.040326204915961415, 0.9275027130671126, 0.020163102457980708, 0.01826103863038837, 0.03652207726077674, 0.931312970149807, 0.9889852243902574, 0.08289906622823459, 0.9118897285105805, 0.675659825047971, 0.07507331389421901, 0.006824846717656273, 0.06142362045890645, 0.18427086137671936, 0.6568364212591972, 0.08033251195256368, 0.00945088375912514, 0.1370378145073145, 0.11813604698906424, 0.9773721883650066, 0.037591238014038714, 0.037205278110815705, 0.9115293137149847, 0.055807917166223554, 0.03992037939273001, 0.03992037939273001, 0.9181687260327901, 0.9455732805372915, 0.9477085894294743, 0.9803641211220215, 0.006729981230608477, 0.013459962461216954, 0.9691172972076207, 0.006729981230608477, 0.951483799346134, 0.9549559785039748, 0.8338076427493175, 0.07444711095976049, 0.05955768876780839, 0.029778844383904195, 0.024219816923182654, 0.9445728600041234, 0.9705768587778711, 0.9680329741305599, 0.823988979729061, 0.05070701413717299, 0.05070701413717299, 0.025353507068586495, 0.06338376767146624, 0.9596301923193037, 0.9812899947956278, 0.9337976110773182, 0.06669982936266558, 0.9559469557199017, 0.07041551431417468, 0.23045077411911716, 0.28806346764889645, 0.40969026510065276, 0.9814868323590926, 0.18918129326559405, 0.10269841634417962, 0.09188805672900281, 0.09729323653659122, 0.5243024413360748, 0.9472433974677457, 0.999523069742716, 0.02081152965100821, 0.27887449732351005, 0.41623059302016424, 0.25806296767250186, 0.029136141511411497, 0.12493673289138223, 0.8495697836613991, 0.9654475537874151, 0.04498116061549642, 0.05997488082066189, 0.04498116061549642, 0.8546420516944319, 0.9832915005278252, 0.8183149574717299, 0.1517842259826596, 0.006599314173159112, 0.019797942519477335, 0.013198628346318225, 0.9803746578783218, 0.976047638653344, 0.8946557071331379, 0.0902863557657295, 0.008207850524157229, 0.035413417745123604, 0.9561622791183373, 0.014165367098049442, 0.9781656496275376, 0.9608690941033579, 0.02596943497576643, 0.9553924847869344, 0.9523219581655311, 0.035271183635760414, 0.9952420059281006, 0.46274412065263965, 0.27031587246045286, 0.132867123751748, 0.0824692492252229, 0.04581624956956828, 0.022684877765109464, 0.975449743899707, 0.942652073508352, 0.027725060985539764, 0.012150681233397763, 0.024301362466795526, 0.9599038174384232, 1.0144161759115062, 0.016018570436542926, 0.9611142261925757, 0.03203714087308585, 0.0066420246737018025, 0.009963037010552704, 0.0033210123368509013, 0.11955644412663245, 0.8601421952443834, 0.09268561054979423, 0.8959609019813441, 0.02439971574395975, 0.02439971574395975, 0.03659957361593963, 0.9149893403984907, 0.7420786081884984, 0.06040174717813359, 0.14668995743261015, 0.017257642050895312, 0.04314410512723828, 0.9765371954661491, 0.6861567243897285, 0.11669332047444361, 0.0420095953707997, 0.03267412973284421, 0.12136105329342137, 0.719371559465751, 0.12763043796973, 0.005801383544078637, 0.011602767088157275, 0.12763043796973, 0.18294284956448745, 0.14899469191334547, 0.2583831999003586, 0.24140912107478757, 0.16785477949731323, 1.0044601089021992, 0.007104020928712942, 0.021312062786138824, 0.9519388044475342, 0.014208041857425883, 0.007104020928712942, 0.981612615116546, 0.1502403366639774, 0.08723632451456752, 0.3586382230043331, 0.3004806733279548, 0.10662217440669364, 0.9935613494919077, 0.9879421005805001, 0.9663781512655335, 0.9699276124999595, 0.01969406200191717, 0.009847031000958585, 0.656468733397239, 0.04595281133780673, 0.2724345243598542, 0.01777170273891934, 0.00888585136945967, 0.3332194263547376, 0.013328777054189505, 0.6308954472316366, 0.9660684946681115, 1.0073847852680484, 0.1665297616821467, 0.6264691034709328, 0.039649943257653975, 0.06343990921224636, 0.11101984112143114, 0.9871685181561459, 0.9774257185566426, 0.010083923617188963, 0.020167847234377926, 0.9075531255470067, 0.020167847234377926, 0.04033569446875585, 0.01890087576379786, 0.03780175152759572, 0.9450437881898931, 0.01890087576379786, 0.1727073594015314, 0.22910159920611306, 0.34893935879084914, 0.19385519932824952, 0.059918879792368034, 0.15386637464143516, 0.17584728530449734, 0.45060866859277443, 0.13554894908888337, 0.08426015754173831, 0.96695865900415, 0.03581328366682037, 0.04848382549574174, 0.12390310960022889, 0.6141284562793954, 0.14006438476547614, 0.07003219238273807, 0.24753590967261685, 0.7259466581745013, 0.004760305955242632, 0.014280917865727894, 0.009520611910485264, 0.9942128446318279, 0.9700153078118111, 0.3698853106045307, 0.07728946788751388, 0.1380169069419891, 0.3809266631598899, 0.027603381388397817, 0.9376234574939952, 0.006843966843021863, 0.006843966843021863, 0.006843966843021863, 0.04106380105813118, 0.9965590043363368, 0.9678292023114641, 0.10796987456314225, 0.7341951470293673, 0.06478192473788534, 0.053984937281571124, 0.03239096236894267, 0.44719335320356474, 0.2710262746688271, 0.08130788240064814, 0.13099603275659977, 0.06775656866720678, 0.9232404296537372, 0.07806596375620782, 0.07806596375620782, 0.05854947281715586, 0.8001761285011301, 0.9788105854801725, 0.29261523454952004, 0.054865356478035004, 0.11582686367585167, 0.37796134462646336, 0.15849991871432334, 0.06174452692718606, 0.041163017951457374, 0.9055863949320622, 0.04646854205683428, 0.4381319679644375, 0.26553452603905303, 0.09625626568915673, 0.15600153404794365, 0.014629422290989274, 0.8704506263138618, 0.05120297801846246, 0.058517689163957096, 0.5393869763243151, 0.05993188625825723, 0.22338248514441333, 0.08717365273928325, 0.08717365273928325, 0.9337265903540886, 0.09097704932426286, 0.6873821504499861, 0.020217122072058415, 0.18195409864852571, 0.010108561036029208, 0.06455271270892349, 0.9252555488279033, 0.9719667388356914, 1.0052270396972158, 0.9756166609678526, 0.9213722613227985, 0.01675222293314179, 0.06700889173256716, 0.19828830078315005, 0.11185493890331542, 0.050843154046961554, 0.40166091697099626, 0.23387850861602313, 0.9855864188079801, 0.744903308079414, 0.1446934483319725, 0.01071803320977574, 0.08574426567820592, 0.01607704981466361, 0.990728635095241, 0.6173307695491451, 0.15602865603989383, 0.013567709220860332, 0.040703127662580996, 0.16959636526075417, 0.809407774942377, 0.024161426117682894, 0.12080713058841447, 0.024161426117682894, 0.024161426117682894, 0.9147823444559959, 0.021274008010604556, 0.021274008010604556, 0.04254801602120911, 0.9913689984527765, 0.9648636611204794, 0.981117028788177, 0.9478097691085676, 0.979900823930565, 0.9901981711818828, 0.026867096017986026, 0.953781908638504, 0.013433548008993013, 0.004477849336331005, 0.9443176183330972, 0.020528643876806463, 0.020528643876806463, 0.9525495977177364, 0.26935152028059395, 0.10018562644583066, 0.23978854854247997, 0.24964287245518463, 0.1428876967342175, 0.04468245287172789, 0.866839585711521, 0.008936490574345578, 0.0804284151691102, 0.011776946313989553, 0.011776946313989553, 0.9362672319621695, 0.041219312098963436, 0.9894434068340391, 1.0075637308591898, 0.017530097602617017, 0.964155368143936, 0.017530097602617017, 0.017530097602617017, 0.026766882386268957, 0.923457442326279, 0.026766882386268957, 0.026766882386268957, 0.12224620465751691, 0.2195442042828875, 0.3018732808889703, 0.24698722981824844, 0.10977210214144376, 0.008294095477832627, 0.008294095477832627, 0.9704091709064173, 0.008294095477832627, 0.04220669580928056, 0.8370994668840644, 0.02110334790464028, 0.02110334790464028, 0.08441339161856112, 0.021315771815151555, 0.9592097316818199, 0.19168393915072926, 0.3042982534017827, 0.15095110208119927, 0.20366418534764982, 0.14855505284181517, 0.05633773985829917, 0.03755849323886611, 0.8012478557624771, 0.02503899549257741, 0.08137673535087658, 0.007229857428744878, 0.014459714857489757, 0.9543411805943239, 0.021689572286234637, 0.8200506075970286, 0.015186122362907936, 0.020248163150543917, 0.015186122362907936, 0.13161306047853547, 0.9535516149163009, 0.3523859752172293, 0.22200316438685444, 0.17266912785644234, 0.1515259693434086, 0.10219193281299649, 0.9602851242393462, 0.235891521447835, 0.04797793656566136, 0.00399816138047178, 0.17192093936028652, 0.5357536249832184, 0.0789359572955859, 0.8814515231340426, 0.008770661921731766, 0.013155992882597651, 0.013155992882597651, 0.983114683273619, 0.08717701316602755, 0.03269137993726033, 0.7627988652027411, 0.098074139811781, 0.021794253291506888, 0.03150447399400917, 0.009001278284002621, 0.018002556568005243, 0.9451342198202752, 0.10432354807207307, 0.8867501586126211, 0.01521621061070587, 0.03043242122141174, 0.9586212684744698, 0.020682279907392877, 0.14477595935175014, 0.8272911962957151, 0.9707839170627101, 0.024739447610664267, 0.8906201139839136, 0.012369723805332133, 0.0371091714159964, 0.0371091714159964, 0.98520773432515, 0.9969588193790279, 0.42408208896633576, 0.1688822478184523, 0.1688822478184523, 0.11634110405271159, 0.12009404289312163, 0.9841141275842376, 0.008344904280188515, 0.0041724521400942575, 0.9805262529221505, 0.0041724521400942575, 0.9744403004868504, 0.0854471726099555, 0.22785912695988136, 0.683577380879644, 0.6256161630931425, 0.07149899006778772, 0.03574949503389386, 0.026812121275420393, 0.24130909147878354, 0.01809234874660081, 0.9588944835698429, 0.01809234874660081, 0.4400298662747968, 0.17601194650991872, 0.09263786658416774, 0.17601194650991872, 0.11116543990100129, 0.21179359078578763, 0.26548774056246616, 0.17898049925559517, 0.14616740772540274, 0.1998615575020813, 0.9599328385304234, 0.9853749668434912, 0.19118279626340576, 0.10000330881470455, 0.052942928196020055, 0.41766087799082485, 0.23824317688209024, 0.935875968854104, 0.11508107842777494, 0.3596283700867967, 0.014385134803471868, 0.05034797181215154, 0.4603243137110998, 0.9834005106925459, 0.007867204085540367, 0.028468698280207996, 0.9394670432468639, 0.9748073099701162, 0.9766326236030124, 0.983227487302505, 0.9862510847300839, 0.02525171719317804, 0.8838101017612313, 0.00631292929829451, 0.07575515157953411, 0.00631292929829451, 0.028790730963632643, 0.9500941217998773, 0.028790730963632643, 0.9878796985452294, 0.9828573020898929, 0.9250597791324318, 0.020944709402667138, 0.020944709402667138, 0.006981569800889046, 0.027926279203556184, 0.9215672137173541, 0.03977929840813867, 0.03977929840813867, 0.9149238633871895, 0.12550587824046167, 0.6275293912023083, 0.0513433138256434, 0.09127700235669939, 0.10839144029858053, 0.04077684602283777, 0.06343064936885875, 0.598060408334954, 0.1585766234221469, 0.14045358074533013, 0.048455682032758435, 0.029073409219655063, 0.7655997761175833, 0.048455682032758435, 0.09691136406551687, 0.01981848023362592, 0.014863860175219441, 0.8175123096370692, 0.014863860175219441, 0.13377474157697497, 0.03538696943841282, 0.9554481748371462, 0.040530498335899244, 0.2026524916794962, 0.05674269767025894, 0.6728062723759274, 0.024318299001539544, 0.22434160603161904, 0.7315487153204968, 0.009753982870939959, 0.019507965741879917, 0.009753982870939959, 0.030279089096180295, 0.9386517619815892, 0.03155260436493994, 0.01577630218246997, 0.9623544331306682, 0.9463054887638868, 0.011067340641570377, 0.04426936256628151, 0.9407239545334821, 0.9940875626776521, 0.9519405502942734, 0.00898057122919126, 0.00898057122919126, 0.03592228491676504, 0.01982386027861514, 0.9515452933735267, 0.006607953426205047, 0.006607953426205047, 0.006607953426205047, 0.9897729904493613, 0.9767269806269863, 0.013756718036999805, 0.10401414717160867, 0.6512190083787673, 0.013567062674557652, 0.20802829434321735, 0.022611771124262756, 0.031803652054828685, 0.9541095616448606, 0.031803652054828685, 0.9664687405763019, 0.03961477525056469, 0.19807387625282347, 0.1452541759187372, 0.49518469063205867, 0.11224186320993329, 0.025728293128834685, 0.9519468457668834, 0.032201036450898314, 0.032201036450898314, 0.933830057076051, 0.11311877348181232, 0.1508250313090831, 0.5117277847986748, 0.12927859826492838, 0.09157234043765759, 0.24861610569714404, 0.041436017616190673, 0.17166350155278992, 0.4557961937780974, 0.0769526041443541, 0.9852657609850308, 1.0000193857257549, 0.7097797913218259, 0.1290508711494229, 0.016131358893677863, 0.07259111502155037, 0.07259111502155037, 0.9800295459283979, 0.0125965308264754, 0.944739811985655, 0.037789592479426204, 0.9625805576983516, 0.8343906463175087, 0.013457913650282398, 0.013457913650282398, 0.09420539555197678, 0.05383165460112959, 0.9880360977506044, 0.9603934908826476, 0.9459600742281579, 0.046522626601384814, 0.5993769837726779, 0.010703160424512106, 0.010703160424512106, 0.28898533146182687, 0.09632844382060896, 0.21662542933337597, 0.5094709171359028, 0.19656751920991522, 0.05616214834569007, 0.024069492148152887, 0.16336425704626187, 0.4828321374922851, 0.09438823740450686, 0.15610362339976136, 0.1016488710510074, 0.9599831168745294, 0.8922794228725129, 0.022878959560833665, 0.03813159926805611, 0.04575791912166733, 0.04229444888130236, 0.8712656469548287, 0.016917779552520943, 0.04229444888130236, 0.025376669328781416, 0.2648030699884556, 0.6620076749711389, 0.010184733461094445, 0.030554200383283336, 0.03564656711383056, 0.038751424196549575, 0.9300341807171898, 0.23680366477429932, 0.2841643977291592, 0.0059200916193574826, 0.07696119105164728, 0.39664613849695135, 0.9072345548917817, 0.010800411367759307, 0.06480246820655584, 0.010800411367759307, 0.010800411367759307, 0.043915695905497015, 0.08783139181099403, 0.02794635193986174, 0.6507507665996376, 0.19163212758762335, 0.008782322225866992, 0.12295251116213789, 0.8431029336832312, 0.008782322225866992, 0.017564644451733984, 0.9636454928009085, 0.9723106342268878, 0.011841688512902456, 0.959176769545099, 0.023683377025804912, 0.9715741428959999, 0.995904528346509, 0.8862946478465186, 0.08341596685614293, 0.010426995857017866, 0.020853991714035732, 0.10313465539162224, 0.8508609069808835, 0.05156732769581112, 0.9489464015124078, 0.9723361453925357, 0.5802694857539696, 0.35662395478629383, 0.01813342142981155, 0.042311316669560284, 0.9603042625988554, 0.032010142086628515, 0.9811133532454437, 0.03542746416762735, 0.03542746416762735, 0.08856866041906837, 0.814831675855429, 0.9876235982000303, 0.9830153098321744, 0.9858898945640783, 0.1339889723943135, 0.48491247152227746, 0.08294555433933694, 0.21693452673365043, 0.08294555433933694, 0.007396306070080002, 0.022188918210240004, 0.10354828498112002, 0.45117467027488006, 0.4141931399244801, 0.13736446959957158, 0.8634338089115928, 0.987351420908175, 0.29014529171257136, 0.1692514201656666, 0.33159461910008153, 0.11053153970002717, 0.09671509723752378, 0.9139667897472411, 0.013641295369361808, 0.027282590738723616, 0.013641295369361808, 0.013641295369361808, 0.9176721467031501, 0.03529508256550577, 0.9444357813843658, 0.015545138160843637, 0.015545138160843637, 0.9637985659723055, 0.980858724658505, 0.9633060845561076, 0.9870848676565456, 0.17760359352093888, 0.24803260474475947, 0.24190834289920984, 0.12860949875654196, 0.20210064090313734, 0.9704260765314023, 0.06516433080874318, 0.024436624053278688, 0.8226996764603826, 0.05701878945765027, 0.024436624053278688, 0.32081787199490563, 0.12638279805859917, 0.029165261090445965, 0.024304384242038304, 0.4958094385375814, 0.9784582357783197, 0.9816586025992959, 0.06870882568449907, 0.25847605852740124, 0.46787438442301743, 0.1963109305271402, 0.006543697684238006, 0.2692435867156289, 0.045378132592521735, 0.2238654541231072, 0.25714275135762316, 0.20571420108609853, 0.964467581868545, 0.21038827046355968, 0.2053186735849197, 0.32698899867227954, 0.12420512352667981, 0.1343443172839598, 0.9461581344399906, 0.037832889522931075, 0.8417817918852165, 0.009458222380732769, 0.06620755666512938, 0.037832889522931075, 0.11708741259534976, 0.055099958868399884, 0.19629360346867458, 0.4476871658057491, 0.1859623611808496, 0.012569743103713246, 0.9427307327784935, 0.02513948620742649, 0.012569743103713246, 0.009237184449102575, 0.9606671827066678, 0.027711553347307728, 0.9611314010834437, 0.13578272602362426, 0.859957264816287, 0.958173699632473, 0.014161170572713596, 0.014161170572713596, 0.033042731336331725, 0.6042099444357801, 0.3351477035542218, 0.9724508463703103, 0.16886117596825956, 0.14775352897222713, 0.010553823498016222, 0.38521455767759216, 0.28759169032094206, 1.0032658331928412, 0.9426969256953693, 0.05237205142752052, 0.09587796288609718, 0.09131234560580684, 0.7852861722099388, 0.02282808640145171, 0.009131234560580683, 0.9506513976602547, 0.972264524181692, 0.517590967725936, 0.12850534371126687, 0.05354389321302787, 0.10351819354518721, 0.19989720132863736, 0.3828511408273532, 0.24583073253124788, 0.09269027620030658, 0.09269027620030658, 0.18538055240061316, 0.4675080265434867, 0.25323351437772196, 0.004869875276494653, 0.01460962582948396, 0.25323351437772196, 0.9694863580395234, 0.9528511688273015, 0.031719451321266405, 0.01903167079275984, 0.12053391502081233, 0.22203615924886483, 0.6090134653683149, 0.03803397534689918, 0.8557644453052315, 0.09508493836724795, 0.9769484160622235, 0.9618626767383885, 0.17538737983988412, 0.20588953285551614, 0.40796629658407824, 0.17157461071293012, 0.041940460396494024, 0.2506072460618916, 0.2602459862950413, 0.2570330728839914, 0.12209070961989592, 0.11245196938674624, 0.9725170079239555, 0.015062049557271778, 0.07531024778635889, 0.6526888141484437, 0.14057912920120327, 0.12049639645817423, 0.06280233299858476, 0.04186822199905651, 0.06280233299858476, 0.04186822199905651, 0.7745621069825454, 0.23369008554549264, 0.1354725133597059, 0.287879090889375, 0.12531207485772794, 0.2167560213755294, 0.9679777529950087, 0.9351396619721455, 0.06089789071731597, 0.030448945358657983, 0.9134683607597395, 0.9605222656221983, 1.0031844924207196, 0.4214072546017158, 0.13584839128607942, 0.09148973290695145, 0.2217932918956399, 0.13030355898868842, 0.26067935537091363, 0.17130357638660038, 0.16385559480457426, 0.2681273369529397, 0.1377876592674829, 0.9692656819318346, 0.9905674065775608], \"Topic\": [5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 4, 5, 5, 4, 5, 3, 4, 2, 1, 2, 3, 4, 5, 3, 4, 2, 4, 1, 2, 3, 2, 3, 3, 4, 1, 3, 4, 5, 2, 4, 5, 5, 3, 4, 5, 2, 3, 4, 1, 1, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 3, 1, 2, 3, 4, 5, 1, 1, 2, 3, 4, 5, 1, 2, 4, 5, 2, 1, 2, 3, 1, 2, 3, 4, 2, 3, 4, 5, 4, 1, 2, 3, 4, 5, 4, 1, 2, 4, 5, 1, 2, 3, 4, 5, 1, 2, 5, 1, 2, 3, 4, 5, 1, 2, 2, 1, 3, 1, 2, 3, 1, 2, 3, 4, 5, 4, 5, 1, 2, 3, 3, 1, 2, 3, 4, 5, 1, 3, 4, 5, 1, 4, 5, 1, 2, 3, 4, 1, 3, 1, 2, 3, 4, 1, 2, 3, 5, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 4, 5, 1, 2, 4, 1, 4, 5, 5, 4, 1, 1, 2, 3, 5, 5, 2, 1, 2, 4, 5, 2, 3, 4, 2, 1, 2, 3, 4, 5, 2, 1, 1, 3, 5, 1, 2, 4, 5, 1, 1, 2, 3, 4, 5, 2, 4, 1, 2, 3, 4, 5, 4, 5, 1, 1, 2, 4, 5, 3, 1, 2, 3, 4, 5, 1, 1, 1, 2, 5, 1, 2, 4, 2, 2, 4, 4, 1, 4, 3, 1, 2, 3, 4, 5, 2, 3, 1, 4, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 5, 4, 5, 1, 2, 4, 5, 1, 2, 3, 4, 5, 2, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 5, 1, 2, 3, 4, 5, 2, 1, 2, 3, 4, 5, 5, 4, 3, 1, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 1, 1, 2, 3, 4, 5, 3, 1, 1, 2, 3, 4, 5, 1, 2, 3, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 4, 1, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 4, 4, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 5, 1, 2, 4, 5, 5, 1, 2, 3, 4, 5, 1, 2, 5, 1, 2, 3, 4, 5, 1, 2, 4, 5, 1, 2, 3, 4, 5, 5, 1, 2, 3, 4, 5, 1, 4, 4, 5, 1, 2, 3, 4, 1, 2, 3, 4, 5, 1, 1, 2, 3, 4, 5, 1, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 2, 3, 4, 5, 1, 3, 4, 2, 2, 2, 1, 2, 4, 5, 2, 4, 5, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 1, 2, 3, 4, 1, 5, 1, 2, 3, 4, 1, 2, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 1, 2, 3, 4, 5, 1, 3, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 1, 2, 3, 4, 5, 1, 1, 2, 3, 4, 5, 2, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 2, 1, 2, 3, 4, 5, 1, 2, 4, 5, 4, 5, 1, 2, 3, 1, 4, 5, 3, 1, 2, 3, 4, 5, 2, 4, 1, 2, 3, 4, 5, 5, 1, 3, 4, 5, 4, 3, 4, 5, 1, 2, 3, 4, 5, 1, 3, 4, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 3, 5, 1, 2, 3, 4, 5, 5, 1, 2, 3, 4, 5, 1, 5, 4, 5, 5, 5, 5, 3, 1, 2, 3, 4, 5, 1, 2, 5, 3, 4, 2, 1, 2, 3, 4, 5, 1, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 3, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 2, 3, 4, 5, 1, 2, 3, 2, 1, 2, 3, 5, 1, 2, 3, 4, 5, 1, 1, 4, 1, 2, 3, 4, 5, 2, 4, 5, 4, 1, 2, 3, 4, 5, 1, 3, 1, 3, 4, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 3, 2, 1, 2, 3, 4, 5, 3, 3, 4, 5, 2, 1, 2, 3, 4, 5, 1, 1, 1, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 4, 1, 2, 3, 4, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 3, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 5, 4, 3, 4, 5, 4, 4, 1, 2, 4, 5, 2, 4, 5, 4, 2, 1, 2, 4, 5, 4, 5, 4, 1, 2, 4, 5, 4, 3, 3, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 4, 5, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 4, 5, 1, 1, 2, 3, 3, 5, 5, 1, 2, 3, 4, 5, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 2, 2, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 3, 1, 2, 3, 4, 5, 2, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 4, 5, 1, 2, 4, 3, 2, 4, 1, 1, 2, 3, 4, 5, 4, 1, 2, 3, 4, 5, 2, 1, 4, 1, 2, 3, 4, 5, 2, 4, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 4, 5, 1, 2, 3, 4, 5, 2, 4, 5, 3, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 3, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 3, 3, 3, 4, 5, 2, 1, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 1], \"Term\": [\"3g\", \"according\", \"according\", \"according\", \"according\", \"according\", \"act\", \"act\", \"act\", \"act\", \"act\", \"actor\", \"actor\", \"actors\", \"actress\", \"actress\", \"album\", \"album\", \"allies\", \"analysts\", \"analysts\", \"analysts\", \"analysts\", \"analysts\", \"anfield\", \"angels\", \"anti-spyware\", \"arms\", \"arsenal\", \"arsenal\", \"arsenal\", \"arsenal's\", \"arsenal's\", \"arsene\", \"artist\", \"artists\", \"artists\", \"artists\", \"artists\", \"asylum\", \"asylum\", \"aviator\", \"aviator,\", \"award\", \"award\", \"award\", \"ball\", \"ball\", \"ball\", \"ballet\", \"band\", \"band\", \"band\", \"band\", \"bank\", \"bank\", \"bank\", \"bank\", \"bank\", \"bbc\", \"bbc\", \"bbc\", \"bbc\", \"bbc\", \"bellamy\", \"best\", \"best\", \"best\", \"best\", \"best\", \"binge\", \"black\", \"black\", \"black\", \"black\", \"black\", \"blair\", \"blair\", \"blair\", \"blair\", \"blair's\", \"bloglines\", \"blunkett\", \"boerse\", \"boss\", \"boss\", \"boss\", \"bowl\", \"box\", \"box\", \"box\", \"box\", \"brit\", \"british\", \"british\", \"british\", \"british\", \"british\", \"brits\", \"broadband\", \"broadband\", \"broadband\", \"broadband\", \"brown\", \"brown\", \"brown\", \"brown\", \"brown\", \"bt\", \"bt\", \"bt\", \"business\", \"business\", \"business\", \"business\", \"business\", \"cabinet\", \"cabinet\", \"cabir\", \"cafes\", \"celtic\", \"champions\", \"champions\", \"champions\", \"chancellor\", \"chancellor\", \"chancellor\", \"chancellor\", \"chancellor\", \"chart\", \"chart\", \"chelsea\", \"chelsea\", \"chelsea\", \"chelsea,\", \"children\", \"children\", \"children\", \"children\", \"children\", \"china\", \"china\", \"china\", \"china\", \"china's\", \"china's\", \"clint\", \"club\", \"club\", \"club\", \"club\", \"club.\", \"club.\", \"clubs\", \"clubs\", \"clubs\", \"clubs\", \"coach\", \"coach\", \"coach\", \"cocoa\", \"comedy\", \"comedy\", \"companies\", \"companies\", \"companies\", \"companies\", \"companies\", \"company\", \"company\", \"company\", \"company\", \"company\", \"concert\", \"concert\", \"conservative\", \"conservative\", \"conservative\", \"consoles\", \"consoles\", \"consoles\", \"copy\", \"countryside\", \"crude\", \"cup\", \"cup\", \"cup\", \"cup\", \"dating\", \"dean.\", \"debt\", \"debt\", \"debt\", \"debt\", \"defender\", \"defender\", \"delta\", \"dem\", \"demand\", \"demand\", \"demand\", \"demand\", \"demand\", \"dems\", \"desktop\", \"deutsche\", \"deutsche\", \"dicaprio\", \"digital\", \"digital\", \"digital\", \"digital\", \"directive\", \"director\", \"director\", \"director\", \"director\", \"director\", \"divide\", \"domains\", \"don't\", \"don't\", \"don't\", \"don't\", \"don't\", \"drama\", \"drama\", \"drinking\", \"dvd\", \"dvd\", \"dvd\", \"dvd\", \"ebbers\", \"economic\", \"economic\", \"economic\", \"economic\", \"economic\", \"economist\", \"economists\", \"economy\", \"economy\", \"economy\", \"election\", \"election\", \"election\", \"election,\", \"election.\", \"election.\", \"elvis\", \"engine\", \"engine\", \"eriksson\", \"european\", \"european\", \"european\", \"european\", \"european\", \"everton\", \"everton\", \"exports\", \"exports\", \"fa\", \"fa\", \"fa\", \"fenice\", \"ferguson\", \"ferguson\", \"ferguson\", \"film\", \"film\", \"film\", \"film\", \"film\", \"film,\", \"film,\", \"films\", \"films\", \"films\", \"films\", \"financial\", \"financial\", \"financial\", \"financial\", \"financial\", \"firefox\", \"firm\", \"firm\", \"firm\", \"firm\", \"firm\", \"firms\", \"firms\", \"firms\", \"firms\", \"firms\", \"first\", \"first\", \"first\", \"first\", \"first\", \"fockers\", \"football\", \"football\", \"football\", \"football\", \"football\", \"forsyth\", \"four\", \"four\", \"four\", \"four\", \"four\", \"foxx\", \"franz\", \"fulham\", \"g7\", \"game\", \"game\", \"game\", \"game\", \"game\", \"games\", \"games\", \"games\", \"games\", \"games\", \"gas\", \"gazprom\", \"general\", \"general\", \"general\", \"general\", \"general\", \"gerrard\", \"gifts\", \"goal\", \"goal\", \"goal\", \"goal\", \"goal\", \"goals\", \"goals\", \"goals\", \"goals\", \"going\", \"going\", \"going\", \"going\", \"going\", \"good\", \"good\", \"good\", \"good\", \"good\", \"google\", \"google\", \"got\", \"got\", \"got\", \"got\", \"got\", \"government\", \"government\", \"government\", \"government\", \"government\", \"grammy\", \"grid\", \"group\", \"group\", \"group\", \"group\", \"group\", \"growth\", \"growth\", \"growth\", \"growth\", \"growth\", \"guantanamo\", \"hdtv\", \"health\", \"health\", \"health\", \"health\", \"health\", \"help\", \"help\", \"help\", \"help\", \"help\", \"hewitt\", \"high-definition\", \"high-definition\", \"high-definition\", \"high-definition\", \"high-speed\", \"hit\", \"hit\", \"hit\", \"hit\", \"hit\", \"hollywood\", \"hollywood\", \"hollywood\", \"home\", \"home\", \"home\", \"home\", \"home\", \"howard\", \"howard\", \"howard\", \"howard\", \"however,\", \"however,\", \"however,\", \"however,\", \"however,\", \"hsdpa\", \"human\", \"human\", \"human\", \"human\", \"human\", \"hunting\", \"hunting\", \"hunts\", \"imelda\", \"imf\", \"immigration\", \"immigration\", \"immigration\", \"including\", \"including\", \"including\", \"including\", \"including\", \"index\", \"information\", \"information\", \"information\", \"information\", \"information\", \"ink\", \"internet\", \"internet\", \"internet\", \"internet\", \"internet\", \"investment\", \"investment\", \"investment\", \"investment\", \"investment\", \"iraq\", \"iraq\", \"iraq\", \"iraq\", \"jeeves\", \"jol\", \"joss\", \"journalist\", \"journalists\", \"kennedy\", \"labour\", \"labour\", \"labour\", \"labour\", \"labour's\", \"labour's\", \"labour's\", \"laptops\", \"last\", \"last\", \"last\", \"last\", \"last\", \"leader\", \"leader\", \"leader\", \"leader\", \"league\", \"league\", \"league\", \"league\", \"lending\", \"leonardo\", \"lib\", \"lib\", \"lib\", \"lib\", \"liberal\", \"liberal\", \"liberal\", \"liberal\", \"like\", \"like\", \"like\", \"like\", \"like\", \"liverpool\", \"liverpool\", \"liverpool\", \"liverpool\", \"lord\", \"lord\", \"lord\", \"lord\", \"lord\", \"madrid\", \"madrid\", \"make\", \"make\", \"make\", \"make\", \"make\", \"manager\", \"manager\", \"manager\", \"manager\", \"manager\", \"manchester\", \"manchester\", \"manchester\", \"manchester\", \"market\", \"market\", \"market\", \"market\", \"market\", \"marsh\", \"may\", \"may\", \"may\", \"may\", \"may\", \"milburn\", \"million\", \"million\", \"million\", \"million\", \"million\", \"minister\", \"minister\", \"minister\", \"minister\", \"minister\", \"minister's\", \"minutes\", \"minutes\", \"minutes\", \"minutes\", \"minutes\", \"mobile\", \"mobile\", \"mobile\", \"mobile\", \"mobiles\", \"mobiles\", \"mourinho\", \"mourinho\", \"mourinho\", \"movie\", \"movie\", \"movie\", \"moyes\", \"mps\", \"mps\", \"mps\", \"mps\", \"mps\", \"mrs\", \"mtv\", \"much\", \"much\", \"much\", \"much\", \"much\", \"multimedia\", \"music\", \"music\", \"music\", \"music\", \"music.\", \"named\", \"named\", \"named\", \"net\", \"net\", \"net\", \"net\", \"net\", \"newcastle\", \"newcastle\", \"newcastle\", \"news\", \"news\", \"news\", \"news\", \"news\", \"next\", \"next\", \"next\", \"next\", \"next\", \"nistelrooy\", \"nominees\", \"number\", \"number\", \"number\", \"number\", \"number\", \"ocean's\", \"office\", \"office\", \"office\", \"office\", \"office\", \"oil\", \"oil\", \"operators\", \"operators\", \"oscar\", \"oscars\", \"oscars.\", \"parry\", \"party\", \"party\", \"party\", \"party\", \"party\", \"party's\", \"party's\", \"party's\", \"pennant\", \"perform\", \"peston\", \"phone\", \"phone\", \"phone\", \"phone\", \"phone\", \"phones\", \"phones\", \"phones\", \"plans\", \"plans\", \"plans\", \"plans\", \"plans\", \"play\", \"play\", \"play\", \"play\", \"play\", \"player\", \"player\", \"player\", \"player\", \"player\", \"players\", \"players\", \"players\", \"players\", \"players\", \"playstation\", \"playstation\", \"police\", \"police\", \"police\", \"police\", \"police\", \"political\", \"political\", \"political\", \"political\", \"political\", \"politics\", \"politics\", \"pop\", \"pop\", \"pop\", \"poppins\", \"premiership\", \"premiership\", \"premiership\", \"prescott\", \"prices\", \"prices\", \"prices\", \"prices\", \"prime\", \"prime\", \"prime\", \"prime\", \"prime\", \"printer\", \"profits\", \"profits\", \"public\", \"public\", \"public\", \"public\", \"public\", \"queen\", \"queen\", \"queen\", \"r&b\", \"radio\", \"radio\", \"radio\", \"radio\", \"radio\", \"rangers\", \"rangers\", \"rapper\", \"rapper\", \"rapper\", \"real\", \"real\", \"real\", \"real\", \"real\", \"record\", \"record\", \"record\", \"record\", \"record\", \"rfid\", \"rift\", \"rise\", \"rise\", \"rise\", \"rise\", \"rise\", \"robots\", \"rock\", \"rock\", \"rock\", \"ronaldinho\", \"rose\", \"rose\", \"rose\", \"rose\", \"rose\", \"rosneft\", \"rosneft.\", \"russian\", \"russian\", \"sales\", \"sales\", \"sales\", \"sales\", \"sales\", \"say\", \"say\", \"say\", \"say\", \"say\", \"says\", \"says\", \"says\", \"says\", \"says\", \"scissor\", \"search\", \"search\", \"search\", \"search\", \"secretary\", \"secretary\", \"secretary\", \"secretary\", \"secretary\", \"security\", \"security\", \"security\", \"security\", \"security\", \"sequel\", \"sequel\", \"service\", \"service\", \"service\", \"service\", \"service\", \"shares\", \"shares\", \"shares\", \"shares\", \"shares\", \"show\", \"show\", \"show\", \"show\", \"show\", \"side\", \"side\", \"side\", \"side\", \"side\", \"sideways\", \"simonetti\", \"singer\", \"singer\", \"singer\", \"single,\", \"singles\", \"site\", \"site\", \"site\", \"site\", \"sky\", \"sky\", \"sky\", \"skype\", \"smoking\", \"software\", \"software\", \"software\", \"software\", \"song\", \"song\", \"songs\", \"sony\", \"sony\", \"sony\", \"sony\", \"soul\", \"souness\", \"southampton\", \"spokesman\", \"spokesman\", \"spokesman\", \"spokesman\", \"spokesman\", \"star\", \"star\", \"star\", \"star\", \"star\", \"starring\", \"starring\", \"staunton\", \"still\", \"still\", \"still\", \"still\", \"still\", \"stock\", \"stock\", \"stock\", \"stock\", \"stock\", \"stone\", \"stone\", \"store\", \"striker\", \"striker\", \"striker\", \"sullivan\", \"swank\", \"t-mobile\", \"take\", \"take\", \"take\", \"take\", \"take\", \"takings\", \"team\", \"team\", \"team\", \"team\", \"team\", \"technology\", \"technology\", \"technology\", \"technology\", \"technology\", \"telegraph\", \"terrorists\", \"think\", \"think\", \"think\", \"think\", \"think\", \"three\", \"three\", \"three\", \"three\", \"three\", \"tie\", \"time\", \"time\", \"time\", \"time\", \"time\", \"tobacco\", \"tony\", \"tony\", \"tony\", \"tony\", \"tony\", \"top\", \"top\", \"top\", \"top\", \"top\", \"tories\", \"tories\", \"tories\", \"tories\", \"tory\", \"tory\", \"tory\", \"tottenham\", \"tour\", \"tour\", \"turkey\", \"tv\", \"tv\", \"tv\", \"tv\", \"tv\", \"u2\", \"uk\", \"uk\", \"uk\", \"uk\", \"uk\", \"unified\", \"unit\", \"unit\", \"united\", \"united\", \"united\", \"united\", \"united\", \"unity\", \"urban\", \"use\", \"use\", \"use\", \"use\", \"use\", \"used\", \"used\", \"used\", \"used\", \"used\", \"users\", \"users\", \"users\", \"users\", \"users\", \"usher\", \"vera\", \"video\", \"video\", \"video\", \"video\", \"video\", \"viewers\", \"viewers\", \"viewers\", \"villa\", \"vodafone\", \"want\", \"want\", \"want\", \"want\", \"want\", \"way\", \"way\", \"way\", \"way\", \"way\", \"wenger\", \"win\", \"win\", \"win\", \"win\", \"win\", \"wireless\", \"wireless\", \"wireless\", \"wireless\", \"wireless\", \"world\", \"world\", \"world\", \"world\", \"world\", \"worldcom\", \"worldcom's\", \"xbox\", \"xbox\", \"xbox\", \"xp\", \"yahoo\", \"year\", \"year\", \"year\", \"year\", \"year\", \"years\", \"years\", \"years\", \"years\", \"years\", \"yugansk\", \"yukos\"]}, \"R\": 30, \"tinfo\": {\"Freq\": [301.0, 239.0, 222.0, 420.0, 458.0, 232.0, 223.0, 212.0, 187.0, 228.0, 304.0, 225.0, 143.0, 169.0, 147.0, 148.0, 201.0, 151.0, 127.0, 120.0, 219.0, 140.0, 138.0, 141.0, 211.0, 250.0, 120.0, 250.0, 123.0, 158.0, 67.22681484557414, 29.520489390327317, 23.896604577979257, 24.43169778424612, 23.125332119543124, 30.848779209432642, 125.07182895061165, 18.916733508318174, 19.01429547561604, 23.45591920601748, 17.546287186442587, 15.03555608138891, 19.156207940673927, 12.829042694996327, 16.781598767214405, 22.79267567548892, 13.151913433273654, 70.90152299258887, 12.13590316397594, 29.826444041145603, 12.516654169108206, 12.15577381172492, 17.343788314597173, 16.11186101454182, 10.538730933106073, 10.931206083629423, 24.757919096319586, 14.011511203832832, 15.904877403781907, 19.07895040745184, 53.78060470734946, 26.300280815010062, 105.71711241713146, 137.12427447671774, 22.453250402989546, 60.76107511048673, 34.40524144088458, 33.42157564717882, 67.45140918336875, 126.82344057766572, 109.15147783520047, 116.84497565534703, 83.68638894401319, 42.026945334492964, 27.020614132057254, 84.83429324803018, 162.1720993813508, 35.576290025675405, 62.19430665832733, 123.77446870986543, 138.51478517340533, 61.935725598572844, 64.87253994716504, 56.48418758357703, 124.3974334471502, 66.61652402218442, 146.65057403902532, 138.55525377097266, 85.64367527110568, 71.59576355286781, 140.06485392982913, 87.93016468324981, 99.36775738144925, 89.72612181728866, 112.01903108033504, 144.56675602126987, 152.48581458085255, 91.46078487241587, 95.52886044157944, 99.39240454117916, 164.14524110074643, 112.79317756557543, 101.28459602168824, 99.01587106671403, 96.27526074625484, 100.03656953363296, 95.33312916626255, 103.62563803550258, 95.22844318075414, 97.26406610648459, 46.48046449560046, 18.0008276741789, 227.88043019520734, 23.867199552138715, 15.426995026119267, 29.968616744870747, 35.51117821158355, 13.749164810303503, 13.67545305564668, 13.91289736648431, 29.1119898060347, 13.02778220244537, 15.189338052586868, 11.627587716436395, 19.869215066805324, 16.17681725799932, 11.185934822670246, 19.4644841999696, 14.36515661307656, 20.724417692144815, 16.00331690276743, 17.807007630869375, 26.239553457973916, 16.090141373973577, 10.181386493320005, 14.5150534966408, 13.274004314766023, 11.882432270504196, 55.14565033414005, 9.396715670213188, 104.14277882794885, 212.97191870971133, 134.6464620862106, 144.05093487028046, 36.87265649023804, 74.85582609587831, 49.628989672072414, 46.20242038874332, 83.03927138427538, 55.87483120046274, 32.995611151002336, 69.11627399610133, 201.13292565226197, 25.688975178385615, 31.253163852004775, 139.83200326173522, 54.78789377210497, 124.33599819224537, 118.7490770259355, 103.18577218440873, 72.27172166318275, 43.23688924037336, 96.62043507628256, 118.53624642083878, 48.82451061428644, 89.48384910054676, 304.6187546116894, 143.59465077853463, 129.73386522229254, 74.82253409880609, 109.86630986347122, 68.3522497748191, 127.18257336380988, 132.6933090694086, 131.70011689256276, 78.62238029768494, 122.49662876744843, 127.4166201052147, 68.2307168965933, 76.45038695351008, 89.08094383989199, 87.71440951420708, 81.31538609343461, 80.85064524373156, 80.84529305235635, 79.27492434616389, 78.66146925319387, 32.0317192777934, 26.057603458820992, 50.47721284889033, 43.260258746438346, 19.996236060457047, 46.65486544205677, 183.48166147345756, 24.676468994753986, 16.229918850310117, 16.15159228251818, 15.260866509489894, 28.777280347619993, 19.969241278703798, 16.07038196195448, 13.92816993049682, 15.826857635895106, 143.90304477196963, 33.31057939973769, 25.671371099698987, 117.29667883915954, 13.675678086798998, 13.09491110478592, 20.218682140944395, 11.7918364742138, 144.17933877756593, 13.050116899767087, 31.386829046486554, 11.402222743616935, 18.034445281780087, 16.13881053260182, 89.44265153626425, 79.1222878605894, 28.49507005972341, 30.63427790868651, 201.99510491608132, 39.537673457955975, 131.67603463543472, 133.92916512450506, 61.68094040129177, 53.10111636276391, 159.2273117043359, 116.44855076603784, 45.09817069674971, 59.64647585936485, 62.564290607956735, 81.59312808986519, 84.96827208007562, 37.26326726589556, 39.426883864481965, 90.26509316120502, 51.48211347569798, 49.70986274364067, 46.32385634332669, 164.6339728405796, 171.84482234968053, 95.56128725702163, 127.83086700011127, 101.42207150557532, 199.67957392393362, 130.3805643332361, 79.43083998251804, 132.12528491664096, 114.42988392410028, 143.4450769613158, 70.06459670109173, 123.08959423786924, 94.89851601369982, 128.51581777956676, 106.88567092929367, 145.529995238324, 137.3042814630478, 120.53111699786918, 99.62579863340017, 98.54431576083233, 96.2386861074655, 24.106773939027107, 22.329071033292426, 44.137094495891084, 39.52219823381949, 30.3524324213319, 22.681970412681874, 23.06418625702074, 93.14957700090854, 234.89587364685673, 16.120216606115022, 16.118509350462272, 18.70907699999957, 14.4130476300936, 24.717897184791155, 17.00837204195843, 24.717879846297052, 16.126308758678487, 19.12359117338913, 16.287967604077508, 15.600120801298225, 12.70882143715369, 18.010602667934908, 22.13826752203196, 16.074735633584204, 14.16105501655211, 123.87351924374968, 12.281090843021255, 25.87474729457028, 12.000614278485934, 14.965622377412664, 81.33376746600757, 90.05267346763596, 26.603312767125853, 25.33747151328228, 60.62421842145798, 75.39181880821236, 25.18488872140997, 25.535291519035084, 42.83202044603876, 29.533065949135892, 61.18129683959387, 26.420935796868207, 28.641268809116653, 45.08306564773915, 162.81165699864124, 37.60317056922997, 127.54961632805882, 82.77130632737516, 44.91742935336011, 129.65311630725822, 141.6779864340775, 170.5147398018931, 145.71987079343933, 51.56942122001355, 32.55032100365792, 75.18677293379918, 86.71487813891542, 77.37843295353181, 119.04665699086236, 151.6467336662355, 79.47935122341607, 53.38093336347376, 127.96066138158473, 98.83840303041639, 69.31249947189005, 85.09848593898651, 61.1324110355786, 84.57586419962196, 80.05036245388247, 71.93461458200052, 62.21191317866378, 62.212024283884276, 61.74216588331455, 25.223528085601927, 41.37256583127123, 23.168951410604837, 31.048538113500385, 25.86910854548672, 17.273241232575945, 17.27319892007297, 14.826480212362604, 17.631714057851056, 14.14752753961277, 17.33758476806974, 12.19234547407572, 12.227833976593647, 12.005408769403045, 11.392110375171713, 12.214333202667436, 20.04462976295722, 10.557469688966778, 10.62285383685596, 10.472147600329382, 10.350226014998887, 10.57330132757993, 10.208775369732676, 9.809823606738787, 9.596816123405667, 9.759005642404489, 13.670115742357122, 12.123132850124497, 8.741591396747925, 18.627090009992003, 209.89026959305448, 132.4145625863767, 33.35924237967047, 24.4746969357433, 110.84877562016759, 92.39522402170361, 75.38743418455579, 55.46308486667909, 26.579437916639563, 259.0863212859918, 14.180562919340824, 43.5378708800528, 34.45075413928483, 57.18577493557652, 29.598707286239296, 43.51571457760896, 28.775847339781023, 22.839270786993772, 72.00190749089465, 46.93034047015078, 46.1856551236006, 48.053774002411075, 39.99586684715306, 142.20358148981003, 34.03400501693337, 40.918661375923314, 55.16840329689879, 217.86073252894573, 96.04590449799885, 133.9004097315689, 97.3031510532611, 72.27279165377948, 102.31459492025795, 47.7782083301452, 37.35893784762728, 109.06229749843152, 76.9958750522891, 64.34538297823566, 66.99641167704218, 64.23698825795134, 82.67103062430617, 71.45497893867177, 81.2224061525404, 89.02975303685297, 86.73270658165949, 53.23601062316904, 67.7767896395756, 66.42077145885985, 66.58367789893623, 63.82817134943576, 61.94042989604712], \"loglift\": [30.0, 29.0, 28.0, 27.0, 26.0, 25.0, 24.0, 23.0, 22.0, 21.0, 20.0, 19.0, 18.0, 17.0, 16.0, 15.0, 14.0, 13.0, 12.0, 11.0, 10.0, 9.0, 8.0, 7.0, 6.0, 5.0, 4.0, 3.0, 2.0, 1.0, 1.369, 1.3621, 1.3621, 1.3617, 1.3616, 1.3609, 1.3589, 1.3586, 1.3571, 1.3569, 1.3569, 1.3527, 1.3527, 1.3515, 1.3515, 1.3515, 1.3514, 1.3501, 1.3501, 1.3494, 1.3492, 1.3475, 1.3475, 1.3469, 1.3465, 1.346, 1.3455, 1.3454, 1.3449, 1.3447, 1.3374, 1.3438, 1.3231, 1.3116, 1.3383, 1.3156, 1.3278, 1.3272, 1.2918, 1.2638, 1.2651, 1.2598, 1.274, 1.3072, 1.327, 1.2524, 1.1777, 1.3042, 1.252, 1.1727, 1.0771, 1.193, 1.1795, 1.2019, 1.0489, 1.1579, 0.996, 0.9515, 1.0726, 1.1167, 0.9065, 1.0315, 0.9867, 1.016, 0.8634, 0.7135, 0.5141, 0.8978, 0.8259, 0.7617, 0.0642, 0.5154, 0.6073, 0.5705, 0.6176, 0.3324, 0.5576, -0.0247, 0.4174, -0.3208, 1.5406, 1.5333, 1.5321, 1.5314, 1.5301, 1.5287, 1.5283, 1.5278, 1.5277, 1.5271, 1.5268, 1.5259, 1.5239, 1.5236, 1.5235, 1.5225, 1.5225, 1.5224, 1.5222, 1.5216, 1.5209, 1.5208, 1.5198, 1.5193, 1.5192, 1.519, 1.5185, 1.5182, 1.518, 1.5171, 1.5131, 1.5044, 1.5044, 1.5025, 1.5085, 1.4909, 1.4985, 1.4989, 1.4806, 1.4865, 1.5005, 1.4739, 1.4263, 1.5073, 1.4967, 1.4271, 1.4661, 1.4159, 1.411, 1.4158, 1.4398, 1.4683, 1.405, 1.3701, 1.4556, 1.385, 1.2303, 1.1201, 1.1373, 1.2369, 1.0847, 1.248, 0.8789, 0.8214, 0.7243, 1.0794, 0.4963, 0.3654, 1.1804, 0.834, 0.2266, 0.0324, 0.1615, 0.2039, -0.0333, 0.2024, -0.3563, 1.6, 1.5982, 1.5945, 1.594, 1.5933, 1.5925, 1.5924, 1.5915, 1.5909, 1.5897, 1.5892, 1.588, 1.588, 1.5876, 1.5875, 1.5871, 1.587, 1.586, 1.5859, 1.5853, 1.5846, 1.5843, 1.5841, 1.5831, 1.5827, 1.5825, 1.582, 1.5817, 1.5817, 1.5815, 1.573, 1.5735, 1.5812, 1.5797, 1.5606, 1.576, 1.5636, 1.563, 1.5708, 1.5728, 1.5484, 1.5545, 1.5734, 1.5673, 1.5636, 1.5554, 1.5513, 1.5707, 1.5667, 1.5188, 1.5511, 1.5505, 1.5446, 1.4091, 1.3702, 1.4376, 1.3899, 1.4218, 1.1903, 1.1891, 1.3512, 1.0997, 1.129, 0.8564, 1.343, 0.8164, 0.9418, 0.4912, 0.7152, 0.1816, 0.2617, 0.4112, 0.7326, 0.5554, 0.5115, 1.6659, 1.6655, 1.6646, 1.6644, 1.6641, 1.6636, 1.6624, 1.6615, 1.6604, 1.6599, 1.6595, 1.6593, 1.6572, 1.6571, 1.6569, 1.6567, 1.6557, 1.6551, 1.6549, 1.6547, 1.6544, 1.6532, 1.6527, 1.6525, 1.6511, 1.6507, 1.65, 1.6498, 1.6496, 1.6494, 1.643, 1.6406, 1.6484, 1.6483, 1.636, 1.6289, 1.6461, 1.6396, 1.5989, 1.6179, 1.5418, 1.6107, 1.5996, 1.5266, 1.2497, 1.5192, 1.1732, 1.2815, 1.4417, 0.8742, 0.8052, 0.6914, 0.7247, 1.2681, 1.5053, 0.9802, 0.8253, 0.8997, 0.5965, 0.2905, 0.7744, 1.0861, 0.259, 0.2805, 0.7199, 0.3236, 0.8868, 0.0842, 0.1752, 0.3633, 0.711, 0.4816, 0.3218, 1.8843, 1.8825, 1.8804, 1.8802, 1.8779, 1.8779, 1.8776, 1.8744, 1.8719, 1.8706, 1.87, 1.8698, 1.8695, 1.8694, 1.8678, 1.8675, 1.866, 1.8655, 1.8653, 1.8653, 1.8649, 1.8646, 1.8645, 1.8629, 1.8623, 1.8619, 1.8604, 1.8595, 1.8588, 1.8578, 1.842, 1.8205, 1.8474, 1.8461, 1.8133, 1.8144, 1.8153, 1.8151, 1.8377, 1.7487, 1.8558, 1.7893, 1.792, 1.7452, 1.795, 1.7411, 1.7814, 1.8066, 1.6561, 1.7, 1.6983, 1.69, 1.7093, 1.4398, 1.737, 1.6741, 1.5967, 1.1549, 1.4036, 1.2742, 1.2564, 1.3742, 1.2005, 1.514, 1.6532, 0.6534, 0.9419, 1.1286, 0.9742, 1.0103, 0.5947, 0.8122, 0.4673, 0.1147, -0.0498, 1.2531, 0.3144, 0.3064, 0.2826, 0.3673, -0.0088], \"logprob\": [30.0, 29.0, 28.0, 27.0, 26.0, 25.0, 24.0, 23.0, 22.0, 21.0, 20.0, 19.0, 18.0, 17.0, 16.0, 15.0, 14.0, 13.0, 12.0, 11.0, 10.0, 9.0, 8.0, 7.0, 6.0, 5.0, 4.0, 3.0, 2.0, 1.0, -6.7321, -7.5551, -7.7664, -7.7443, -7.7993, -7.5111, -6.1113, -8.0001, -7.995, -7.7851, -8.0753, -8.2298, -7.9876, -8.3885, -8.1199, -7.8137, -8.3636, -6.6789, -8.444, -7.5448, -8.4131, -8.4424, -8.0869, -8.1606, -8.5851, -8.5486, -7.731, -8.3003, -8.1736, -7.9916, -6.9553, -7.6706, -6.2794, -6.0193, -7.8287, -6.8332, -7.402, -7.431, -6.7288, -6.0974, -6.2474, -6.1793, -6.5131, -7.2019, -7.6436, -6.4995, -5.8515, -7.3685, -6.8099, -6.1217, -6.0092, -6.8141, -6.7678, -6.9062, -6.1167, -6.7412, -5.9521, -6.0089, -6.49, -6.6691, -5.9981, -6.4636, -6.3414, -6.4434, -6.2215, -5.9664, -5.9131, -6.4243, -6.3808, -6.3411, -5.8394, -6.2146, -6.3222, -6.3449, -6.373, -6.3346, -6.3828, -6.2994, -6.3839, -6.3628, -6.9244, -7.873, -5.3346, -7.5909, -8.0273, -7.3633, -7.1936, -8.1424, -8.1478, -8.1306, -7.3923, -8.1963, -8.0428, -8.31, -7.7742, -7.9798, -8.3487, -7.7948, -8.0986, -7.7321, -7.9906, -7.8838, -7.4961, -7.9852, -8.4428, -8.0882, -8.1776, -8.2883, -6.7534, -8.523, -6.1176, -5.4022, -5.8608, -5.7932, -7.1559, -6.4478, -6.8588, -6.9304, -6.3441, -6.7403, -7.267, -6.5276, -5.4594, -7.5173, -7.3213, -5.823, -6.7599, -5.9404, -5.9864, -6.1269, -6.483, -6.9967, -6.1926, -5.9882, -6.8752, -6.2693, -5.0443, -5.7964, -5.8979, -6.4483, -6.0641, -6.5387, -5.9178, -5.8754, -5.8829, -6.3987, -5.9553, -5.9159, -6.5405, -6.4268, -6.2739, -6.2893, -6.3651, -6.3708, -6.3709, -6.3905, -6.3983, -7.2357, -7.4421, -6.7809, -6.9352, -7.7069, -6.8596, -5.4903, -7.4966, -7.9156, -7.9204, -7.9771, -7.3428, -7.7082, -7.9254, -8.0685, -7.9407, -5.7333, -7.1965, -7.457, -5.9377, -8.0868, -8.1302, -7.6958, -8.235, -5.7314, -8.1336, -7.256, -8.2686, -7.8101, -7.9212, -6.2088, -6.3314, -7.3527, -7.2803, -5.3942, -7.0252, -5.8221, -5.8051, -6.5804, -6.7302, -5.6321, -5.945, -6.8936, -6.614, -6.5662, -6.3007, -6.2601, -7.0844, -7.028, -6.1997, -6.7612, -6.7962, -6.8668, -5.5987, -5.5558, -6.1426, -5.8517, -6.0831, -5.4057, -5.832, -6.3275, -5.8187, -5.9625, -5.7365, -6.453, -5.8895, -6.1496, -5.8464, -6.0307, -5.722, -5.7802, -5.9105, -6.101, -6.1119, -6.1356, -7.4522, -7.5288, -6.8474, -6.9578, -7.2218, -7.5131, -7.4964, -6.1005, -5.1756, -7.8546, -7.8547, -7.7057, -7.9666, -7.4272, -7.801, -7.4272, -7.8543, -7.6838, -7.8443, -7.8874, -8.0924, -7.7437, -7.5374, -7.8575, -7.9842, -5.8154, -8.1266, -7.3814, -8.1497, -7.929, -6.2361, -6.1343, -7.3537, -7.4024, -6.53, -6.312, -7.4085, -7.3946, -6.8774, -7.2492, -6.5209, -7.3605, -7.2799, -6.8262, -5.5421, -7.0076, -5.7862, -6.2186, -6.8299, -5.7698, -5.6811, -5.4959, -5.653, -6.6918, -7.1519, -6.3147, -6.1721, -6.286, -5.8552, -5.6132, -6.2592, -6.6573, -5.783, -6.0412, -6.3961, -6.1909, -6.5217, -6.1971, -6.2521, -6.3589, -6.5042, -6.5042, -6.5117, -7.1885, -6.6936, -7.2734, -6.9807, -7.1632, -7.5671, -7.5671, -7.7198, -7.5465, -7.7667, -7.5634, -7.9154, -7.9125, -7.9309, -7.9833, -7.9136, -7.4183, -8.0594, -8.0532, -8.0675, -8.0792, -8.0579, -8.093, -8.1329, -8.1548, -8.1381, -7.801, -7.9211, -8.2482, -7.4916, -5.0697, -5.5303, -6.9089, -7.2186, -5.7081, -5.8902, -6.0936, -6.4005, -7.1361, -4.8591, -7.7644, -6.6426, -6.8767, -6.3699, -7.0285, -6.6431, -7.0567, -7.2878, -6.1395, -6.5676, -6.5836, -6.5439, -6.7275, -5.459, -6.8889, -6.7047, -6.4059, -5.0324, -5.8514, -5.5191, -5.8384, -6.1358, -5.7882, -6.5497, -6.7957, -5.7243, -6.0725, -6.252, -6.2116, -6.2537, -6.0014, -6.1472, -6.0191, -5.9273, -5.9534, -6.4415, -6.2, -6.2202, -6.2178, -6.26, -6.2901], \"Total\": [301.0, 239.0, 222.0, 420.0, 458.0, 232.0, 223.0, 212.0, 187.0, 228.0, 304.0, 225.0, 143.0, 169.0, 147.0, 148.0, 201.0, 151.0, 127.0, 120.0, 219.0, 140.0, 138.0, 141.0, 211.0, 250.0, 120.0, 250.0, 123.0, 158.0, 67.63800177060837, 29.904768491395775, 24.208947463009892, 24.761012844451294, 23.43853511396515, 31.290101953114437, 127.1099604290123, 19.230066637500418, 19.358385027267026, 23.886011660046176, 17.868048300144316, 15.37489118432989, 19.589090727119384, 13.13432486584418, 17.18137680496105, 23.336360527184826, 13.46697854608071, 72.69175666103057, 12.443169930036227, 30.60087507656355, 12.844915028268135, 12.494878520023523, 17.828085794277843, 16.57262472439087, 10.84367566409903, 11.254052140395506, 25.500455156708927, 14.43276192370779, 16.392642496502784, 19.667342538198977, 55.845200306302075, 27.13495476861119, 111.35149140062603, 146.11409186174012, 23.294331317850034, 64.4847511664507, 36.0684508691093, 35.06089684191025, 73.30682115761444, 141.74606825705845, 121.83457740328168, 131.12484385591029, 92.58906591142775, 44.97762630977904, 28.351756219094657, 95.90490048262102, 197.54878357410658, 38.188307417513876, 70.3388228379707, 151.5308975692086, 186.60139979561112, 74.30572271349179, 78.88455015669372, 67.16177344615235, 172.37267496659157, 82.77657081409903, 214.23676949423268, 211.62042100760516, 115.89068738948852, 92.70082998524136, 223.77938464348247, 123.98211540528257, 146.52343728291248, 128.48478953972605, 186.86069540914764, 280.1439921509167, 360.6962109460114, 147.4088195319666, 165.4403727179674, 183.54169519375762, 608.8697766738233, 266.45784611047344, 218.26317286873964, 221.38075016274826, 205.3440680147772, 283.77973878885143, 215.89443644871346, 420.14106210911825, 248.13821840703423, 530.2202312411639, 47.00384683288259, 18.337172651212185, 232.43354144849454, 24.360344690594193, 15.76533356096632, 30.669651925952717, 36.35635880546118, 14.083266430061666, 14.010110531909499, 14.261577256013384, 29.850302880146494, 13.369861916170825, 15.620360683897594, 11.96093757305641, 20.440320566253803, 16.657604485238732, 11.518855578277543, 20.04621667686528, 14.796680903965678, 21.3606818790187, 16.505354246354344, 18.369205903714462, 27.093770296202663, 16.62198542453212, 10.519103032522775, 14.999709219750661, 13.724033373843241, 12.288318412973313, 57.04474799106155, 9.729100975983043, 108.25809590682726, 223.32149317452595, 141.18942249476882, 151.3327857357949, 38.50680621019123, 79.55612073762975, 52.35027924099738, 48.71242377241555, 89.16995827029122, 59.646188496513474, 34.733400873467296, 74.71919856553681, 228.03296009443036, 26.858589216293932, 33.02609258896596, 158.40506882758189, 59.69357045873883, 142.43423228894315, 136.7107982952863, 118.218823799603, 80.8425487696772, 47.00571699989608, 111.900750264399, 142.15753886805558, 53.75581373274544, 105.72811250844428, 420.14106210911825, 221.1237665781487, 196.3723456917135, 102.52222227899334, 175.29059442020184, 92.61842750546, 249.27821339431316, 275.4580519241537, 301.27908861175416, 126.10358525632458, 351.9812954473699, 417.35369355641524, 98.92604856772125, 156.72931603803568, 335.2320518131772, 400.83043999016286, 326.5699688287106, 311.2439932432624, 394.50868538023377, 305.63759154360963, 530.2202312411639, 32.44609866133402, 26.441802848944945, 51.41298259321515, 44.08223003687737, 20.39029627530018, 47.610918638073656, 187.27273587103522, 25.20943331351706, 16.5900310649999, 16.529305503659135, 15.626093199357301, 29.50106647367581, 20.47190995059269, 16.481525619430347, 14.285283600034296, 16.239273334743526, 147.66090437502768, 34.215769011195064, 26.372113299220068, 120.5676981501683, 14.066930371316545, 13.473406164870305, 20.80880926110085, 12.147228065999768, 148.58882450547148, 13.452290889415986, 32.36996053691886, 11.762948837825736, 18.605325199280852, 16.652721236183243, 93.07870248405263, 82.2999123087327, 29.411416391254523, 31.664949129561155, 212.81905728348008, 41.02234007594217, 138.31531394023665, 140.76535106452357, 64.3287946143111, 55.27198342270956, 169.82330959802778, 123.44473282280931, 46.91361911132797, 62.427543329254576, 65.71938477878433, 86.4163091390678, 90.35594298452054, 38.867716369387196, 41.28850367332145, 99.16774838470704, 54.761397762769654, 52.907601345931724, 49.5955422576446, 201.83182327034436, 219.02843331108272, 113.86510017301032, 159.75081752723526, 122.76654882684119, 304.6603590166373, 199.17608082438127, 103.18707301694263, 220.71349007619165, 185.62891661241656, 305.63759154360963, 91.76731009083895, 272.96412291428413, 185.6455772425473, 394.50868538023377, 262.2765676868806, 608.8697766738233, 530.2202312411639, 400.83043999016286, 240.25144157329038, 283.7169195904313, 289.5101261309231, 24.461913610493042, 22.66693235165519, 44.84700962885844, 40.164492540677195, 30.855800303162916, 23.070160525111685, 23.48675068233666, 94.9393510648646, 239.66721880179784, 16.455646412550102, 16.46146864980815, 19.110595988161858, 14.753204161675663, 25.305126672211227, 17.41579107442658, 25.31328741593776, 16.531572797846344, 19.616514700020716, 16.710478479737972, 16.007634525252637, 13.044887400979746, 18.509932987549256, 22.76328149721788, 16.531842562496813, 14.583589808933912, 127.61891917386211, 12.66212012199242, 26.681983480167915, 12.37768835062947, 15.438862910955056, 84.44741633850788, 93.7202962698869, 27.470925781991657, 26.167256282715414, 63.38620979960451, 79.3869370682759, 26.067015862768546, 26.601943772815964, 46.47364725828622, 31.44292983321618, 70.28639702609912, 28.332558739423654, 31.054901028569315, 52.584563715952854, 250.47992006482374, 44.18824231703881, 211.8468939128902, 123.36389152095201, 57.03243800803226, 290.3813419936341, 339.9887504022329, 458.4827876551463, 379.00955997149947, 77.89213333851467, 38.78424749480401, 151.45864042014153, 203.95398697166956, 168.93515358640127, 351.9812954473699, 608.8697766738233, 196.68331336729122, 96.72547839133675, 530.2202312411639, 400.83043999016286, 181.1372284303396, 330.5556915418768, 135.20262554375114, 417.35369355641524, 360.6962109460114, 268.5291280561857, 164.03793901536196, 206.336065855161, 240.25144157329038, 25.59816188381001, 42.05959432255068, 23.603634819382933, 31.637020500854906, 26.41969998319577, 17.641342305860025, 17.647558001082924, 15.196261731386631, 18.116646756845896, 14.55509225856757, 17.84683972438936, 12.552997766453553, 12.593782106358447, 12.36570233447523, 11.753694256588842, 12.605435977718919, 20.71648706627233, 10.917423546617602, 10.987176467832667, 10.831414741824636, 10.709773185540097, 10.942801541941517, 10.567412023639974, 10.170586287650588, 9.955596953401427, 10.128106151710307, 14.207789390922942, 12.611880526233321, 9.100237069313955, 19.41131438691912, 222.1906641365003, 143.23426228190945, 35.12629872140026, 25.805503171391567, 120.76406025058468, 100.55481519456907, 81.96816803060946, 60.31431025090425, 28.258989562256566, 301.1130036777384, 14.805832914446304, 48.587302378036405, 38.3422542074255, 66.69458855551346, 32.84185997974658, 50.959320269685165, 32.367483821971334, 25.049862130872242, 91.7949434242564, 57.261193596086244, 56.45337725942986, 59.22617407078412, 48.35056891588389, 225.07691349350307, 40.02025572692789, 51.238719251473015, 74.64148285563908, 458.4827876551463, 157.63198263923735, 250.11496656545685, 185.00772140754452, 122.14531360869947, 205.7241998071979, 70.21882429496486, 47.76892603762992, 379.00955997149947, 200.50145217464302, 139.03241278749073, 168.916304729171, 156.21557418328325, 304.6603590166373, 211.8468939128902, 339.9887504022329, 530.2202312411639, 608.8697766738233, 101.56294581313436, 330.5556915418768, 326.5699688287106, 335.2320518131772, 295.2628471119615, 417.35369355641524], \"Category\": [\"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\"], \"Term\": [\"film\", \"music\", \"mobile\", \"government\", \"best\", \"blair\", \"labour\", \"club\", \"chelsea\", \"minister\", \"game\", \"games\", \"phone\", \"league\", \"arsenal\", \"cup\", \"players\", \"prime\", \"band\", \"broadband\", \"united\", \"football\", \"manchester\", \"election\", \"tv\", \"million\", \"liverpool\", \"show\", \"boss\", \"party\", \"yukos\", \"yahoo\", \"jeeves\", \"yugansk\", \"desktop\", \"ink\", \"oil\", \"rosneft\", \"directive\", \"ballet\", \"gazprom\", \"imf\", \"g7\", \"printer\", \"lending\", \"index\", \"binge\", \"profits\", \"bloglines\", \"crude\", \"cafes\", \"rosneft.\", \"marsh\", \"drinking\", \"fenice\", \"gifts\", \"economist\", \"grid\", \"economists\", \"gas\", \"google\", \"turkey\", \"prices\", \"growth\", \"store\", \"russian\", \"exports\", \"china's\", \"stock\", \"bank\", \"economy\", \"search\", \"shares\", \"deutsche\", \"engine\", \"site\", \"market\", \"unit\", \"china\", \"economic\", \"information\", \"rose\", \"demand\", \"debt\", \"firms\", \"investment\", \"firm\", \"company\", \"financial\", \"analysts\", \"net\", \"rise\", \"companies\", \"business\", \"sales\", \"use\", \"year\", \"internet\", \"software\", \"however,\", \"last\", \"much\", \"european\", \"help\", \"users\", \"may\", \"news\", \"government\", \"used\", \"first\", \"blunkett\", \"forsyth\", \"blair\", \"mrs\", \"cabir\", \"election,\", \"kennedy\", \"prescott\", \"anti-spyware\", \"terrorists\", \"blair's\", \"smoking\", \"milburn\", \"unified\", \"telegraph\", \"xp\", \"dean.\", \"journalist\", \"tobacco\", \"minister's\", \"allies\", \"journalists\", \"dems\", \"ronaldinho\", \"unity\", \"rift\", \"divide\", \"firefox\", \"lib\", \"peston\", \"tory\", \"labour\", \"election\", \"prime\", \"election.\", \"tories\", \"cabinet\", \"labour's\", \"chancellor\", \"asylum\", \"party's\", \"liberal\", \"minister\", \"dem\", \"politics\", \"party\", \"immigration\", \"brown\", \"howard\", \"secretary\", \"mps\", \"iraq\", \"leader\", \"lord\", \"conservative\", \"tony\", \"government\", \"public\", \"security\", \"political\", \"plans\", \"health\", \"say\", \"says\", \"home\", \"general\", \"bbc\", \"make\", \"human\", \"spokesman\", \"next\", \"like\", \"take\", \"way\", \"time\", \"think\", \"first\", \"parry\", \"ebbers\", \"wenger\", \"everton\", \"sullivan\", \"gerrard\", \"chelsea\", \"bellamy\", \"boerse\", \"worldcom\", \"nistelrooy\", \"souness\", \"villa\", \"moyes\", \"robots\", \"rfid\", \"arsenal\", \"tie\", \"southampton\", \"liverpool\", \"eriksson\", \"jol\", \"tottenham\", \"pennant\", \"cup\", \"fulham\", \"celtic\", \"worldcom's\", \"anfield\", \"chelsea,\", \"champions\", \"fa\", \"arsene\", \"arsenal's\", \"club\", \"club.\", \"manchester\", \"football\", \"striker\", \"newcastle\", \"league\", \"boss\", \"madrid\", \"ferguson\", \"mourinho\", \"ball\", \"premiership\", \"rangers\", \"defender\", \"goal\", \"coach\", \"goals\", \"clubs\", \"players\", \"united\", \"side\", \"manager\", \"team\", \"game\", \"win\", \"player\", \"play\", \"got\", \"think\", \"minutes\", \"good\", \"real\", \"time\", \"want\", \"last\", \"first\", \"like\", \"don't\", \"going\", \"still\", \"joss\", \"delta\", \"songs\", \"singles\", \"urban\", \"mtv\", \"angels\", \"album\", \"music\", \"simonetti\", \"hunts\", \"grammy\", \"skype\", \"franz\", \"bowl\", \"soul\", \"arms\", \"brit\", \"brits\", \"domains\", \"guantanamo\", \"u2\", \"r&b\", \"hdtv\", \"scissor\", \"band\", \"countryside\", \"music.\", \"usher\", \"single,\", \"singer\", \"song\", \"perform\", \"elvis\", \"pop\", \"rock\", \"artist\", \"concert\", \"hunting\", \"queen\", \"chart\", \"stone\", \"rapper\", \"viewers\", \"show\", \"tour\", \"tv\", \"police\", \"artists\", \"top\", \"number\", \"best\", \"uk\", \"black\", \"sky\", \"radio\", \"british\", \"record\", \"bbc\", \"last\", \"including\", \"act\", \"first\", \"like\", \"group\", \"three\", \"star\", \"make\", \"year\", \"years\", \"hit\", \"four\", \"don't\", \"oscars\", \"oscar\", \"aviator\", \"3g\", \"multimedia\", \"sideways\", \"swank\", \"t-mobile\", \"foxx\", \"vodafone\", \"laptops\", \"dicaprio\", \"vera\", \"takings\", \"ocean's\", \"aviator,\", \"actors\", \"leonardo\", \"clint\", \"hewitt\", \"hsdpa\", \"imelda\", \"poppins\", \"oscars.\", \"fockers\", \"staunton\", \"nominees\", \"dating\", \"cocoa\", \"high-speed\", \"mobile\", \"phone\", \"operators\", \"sequel\", \"broadband\", \"phones\", \"films\", \"comedy\", \"playstation\", \"film\", \"copy\", \"hollywood\", \"mobiles\", \"dvd\", \"xbox\", \"starring\", \"film,\", \"consoles\", \"actor\", \"actress\", \"sony\", \"bt\", \"movie\", \"games\", \"drama\", \"high-definition\", \"box\", \"best\", \"video\", \"million\", \"director\", \"award\", \"technology\", \"named\", \"wireless\", \"uk\", \"according\", \"office\", \"service\", \"digital\", \"game\", \"tv\", \"number\", \"first\", \"last\", \"children\", \"three\", \"take\", \"next\", \"world\", \"make\"]}};\n",
       "\n",
       "function LDAvis_load_lib(url, callback){\n",
       "  var s = document.createElement('script');\n",
       "  s.src = url;\n",
       "  s.async = true;\n",
       "  s.onreadystatechange = s.onload = callback;\n",
       "  s.onerror = function(){console.warn(\"failed to load library \" + url);};\n",
       "  document.getElementsByTagName(\"head\")[0].appendChild(s);\n",
       "}\n",
       "\n",
       "if(typeof(LDAvis) !== \"undefined\"){\n",
       "   // already loaded: just create the visualization\n",
       "   !function(LDAvis){\n",
       "       new LDAvis(\"#\" + \"ldavis_el289547981512009113565943\", ldavis_el289547981512009113565943_data);\n",
       "   }(LDAvis);\n",
       "}else if(typeof define === \"function\" && define.amd){\n",
       "   // require.js is available: use it to load d3/LDAvis\n",
       "   require.config({paths: {d3: \"https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min\"}});\n",
       "   require([\"d3\"], function(d3){\n",
       "      window.d3 = d3;\n",
       "      LDAvis_load_lib(\"https://cdn.rawgit.com/bmabey/pyLDAvis/files/ldavis.v1.0.0.js\", function(){\n",
       "        new LDAvis(\"#\" + \"ldavis_el289547981512009113565943\", ldavis_el289547981512009113565943_data);\n",
       "      });\n",
       "    });\n",
       "}else{\n",
       "    // require.js not available: dynamically load d3 & LDAvis\n",
       "    LDAvis_load_lib(\"https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js\", function(){\n",
       "         LDAvis_load_lib(\"https://cdn.rawgit.com/bmabey/pyLDAvis/files/ldavis.v1.0.0.js\", function(){\n",
       "                 new LDAvis(\"#\" + \"ldavis_el289547981512009113565943\", ldavis_el289547981512009113565943_data);\n",
       "            })\n",
       "         });\n",
       "}\n",
       "</script>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "doc_topic, topic_term, doc_lengths, term_frequency, vocab = ldaseq.dtm_vis(time=0, corpus=corpus)\n",
    "vis_dtm = pyLDAvis.prepare(topic_term_dists=topic_term, doc_topic_dists=doc_topic, doc_lengths=doc_lengths, vocab=vocab, term_frequency=term_frequency)\n",
    "pyLDAvis.display(vis_dtm)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Visualising topics is a handy way to compare topic models."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Topic Coherence for DTM\n",
    "\n",
    "Similar to visualising DTM time-slices, finding coherence values for both python DTM and the wrapper is very easy.\n",
    "We just have to specify the time-slice we want to find coherence for.\n",
    "The following examples will illustrate this."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "U_mass topic coherence\n",
      "Wrapper coherence is  -1.8017627313\n",
      "DTM Python coherence is -1.80238943495\n",
      "C_v topic coherence\n",
      "Wrapper coherence is  0.647868838777\n",
      "DTM Python coherence is 0.621369722784\n"
     ]
    }
   ],
   "source": [
    "from gensim.models.coherencemodel import CoherenceModel\n",
    "import pickle\n",
    "\n",
    "# we just have to specify the time-slice we want to find coherence for.\n",
    "topics_wrapper = dtm_model.dtm_coherence(time=0)\n",
    "topics_dtm = ldaseq.dtm_coherence(time=2)\n",
    "\n",
    "# running u_mass coherence on our models\n",
    "cm_wrapper = CoherenceModel(topics=topics_wrapper, corpus=corpus, dictionary=dictionary, coherence='u_mass')\n",
    "cm_DTM = CoherenceModel(topics=topics_dtm, corpus=corpus, dictionary=dictionary, coherence='u_mass')\n",
    "\n",
    "print (\"U_mass topic coherence\")\n",
    "print (\"Wrapper coherence is \", cm_wrapper.get_coherence())\n",
    "print (\"DTM Python coherence is\", cm_DTM.get_coherence())\n",
    "\n",
    "# to use 'c_v' we need texts, which we have saved to disk.\n",
    "texts = pickle.load(open('Corpus/texts', 'rb'))\n",
    "cm_wrapper = CoherenceModel(topics=topics_wrapper, texts=texts, dictionary=dictionary, coherence='c_v')\n",
    "cm_DTM = CoherenceModel(topics=topics_dtm, texts=texts, dictionary=dictionary, coherence='c_v')\n",
    "\n",
    "print (\"C_v topic coherence\")\n",
    "print (\"Wrapper coherence is \", cm_wrapper.get_coherence())\n",
    "print (\"DTM Python coherence is\", cm_DTM.get_coherence())"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true
   },
   "source": [
    "Our values are a little behind the wrapper - but not by much. "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Conclusion\n",
    "\n",
    "So while there is already a python wrapper of DTM, a pure python implementation will be useful to better understand what goes on undcer the hood and tune our model. When it comes to performance, the C++ is undoubtedly faster, but we can continue to work on ours to make it as fast.\n",
    "As for evaluating the results, our topics are on par if not better than the wrapper!\n",
    "\n",
    "On a more personal note, implementing Dynamic Topic Models with the Google Summer of Code 2016 program was a great learning experience. Gensim and RaRe Technologies have been a joy to work with, and Lev and Radim have been great mentors throughout, especially when things became slow or difficult. \n",
    "I look forward to continuing my contribution to gensim for a long time!"
   ]
  }
 ],
 "metadata": {
  "anaconda-cloud": {},
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.12"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
